6 Replies Latest reply on Jul 31, 2021 2:50 AM by Jeffline Jenisha W

    Filter

    Retro Flame Guru

      Hello,

       

       

      Please consider this problem statementFilter

       

      Consider this table, I want to load the columns A,C and D to target using mapping, but I want to filter it in way that only the parameters having DY in column B are loaded although the column B is not in target. Is a simple filter saying Scope ID = DY enough to run this ?

       

      Thanks

        • 1. Re: Filter
          user126898 Guru

          Assuming this is a CSV file when you create the source object you would define the format as delimited with the header coming from row 1.  After the source put in a filter transform where the condition is Scope_id='DY'. 

           

          On the target transform, in the incoming fields tab put a exclude rule to drop column B (Scope_id).  This allows you to use in the filter but not have to map to anything in the target.

           

          Thanks,

          Scott

          • 2. Re: Filter
            Retro Flame Guru

            Hi

             

            Thank you for your reply, actually I am trying to load from Azure Synapse to Anaplan , the above screenshot was just for example. I used a filter transformation and selected the column Scope ID and put its = DY or should I type 'DY'?. on the target there we I don't have anything for column B so it is not mapped anywhere. Will this work?

            • 3. Re: Filter
              Retro Flame Guru

              Should I still be  using the exclude rule in target even if it is not being mapped. I only have target headers for column A, C and D. So Column B in source is not mapped anywhere on the target so is exclude rule needed?

              • 4. Re: Filter
                Nico Heinze Guru

                Regarding the filter transformation, the syntax is as follows (assuming the port is named ScopeID):

                  ScopeID = 'DY'

                (with single quotes around DY)

                 

                Regards,

                Nico

                1 of 1 people found this helpful
                • 5. Re: Filter
                  Retro Flame Guru

                  Thank you for you reply, will it always be in single quotes if the data is present in a source system like azure synapse? The above excel representation was just an example

                  • 6. Re: Filter
                    Retro Flame Guru

                    Is this the correct way?

                    • 7. Re: Filter
                      Nico Heinze Guru

                      looks good to me.

                      As long as the port to be checked is a String port, the syntax is as you've used it.

                       

                      Regards,

                      Nico

                      • 8. Re: Filter
                        Jeffline Jenisha W Active Member

                        Hi Shawn,

                         

                        Excluding or not mapping the Scope Id column in the target should not cause any issues as the records are already filtered in a previous transformation.

                         

                        Also, Since you are reading from Azure Synapse, you can also check if the Filter condition can be applied at the source itself.

                         

                        Regards,

                        Jeffline