Forum Discussion

darshthakkar's avatar
darshthakkar
Valued Contributor
3 years ago
Solved

Selecting columns from the payload dynamically

Hi Team,

I’m uncertain of the no. of columns in the payload that I would be receiving from upstream system, how can I ensure that I’m fetching all those columns dynamically? Rationale behind this is that I need to ingest this dynamic payload into a database so fixing a structure in snapLogic (using mapper snap) and creating a table in my database wouldn’t help.

For instance, in today’s payload, I have 10 columns, tomorrow it may be 12, day after tomorrow it may be 8 so how can I handle this dynamic behavior?

Thanking in advance for your inputs.

Regards,
Darsh

1 Reply

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    arvindnsn 

    You can try: 

    ['ABC', 'AEC', AMT'].indexOf($src_name) != -1

    ['ANC', 'ABK', AGT'].indexOf($src_name) != -1

    BR,

    Spiro Taleski