Fetching records using AND NOT filters

The example pipeline demonstrates how to use AND and NOT filters to fetch LDAP records based on the specified common name (cn), and shows the difference in results depending on the filter used.



Download this Pipeline
  1. Configure the LDAP Search Snap with the Distinguished name set to CN=Users,DC=snapqa-ad,DC=local, as shown:


  2. Configure the Filter field and observe how different filter expressions affect the output.
    Filter configuration Output
    Presence filter(cn=user*): Returns all entries whose cn starts with user.

    Snap settings with presence filter (cn=user*)

    Output showing Users entry
    NOT filter(!(cn=user*)): Returns all entries whose cn does not start with user.

    Snap settings with NOT filter (!(cn=user*))

    Output showing adduser entries
    AND NOT nested filter(&(!(cn=adduser*))(cn=user*)): Returns entries whose cn starts with user but not adduser.

    Snap settings with AND NOT filter (&(!(cn=adduser*))(cn=user*))

    Output showing only Users entry
To successfully reuse pipelines:
  1. Download and import the pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide pipeline parameters as applicable.