Hi,
I have a workflow where sometimes i may not get all the required columns that i need.
I need to have all columns for the data to get uploaded successfully to downstream platform.
Scenario: My API yielded 7 columns like Created_date, event_name, event_id, form_name, event5, event6, event7
But sometimes i get columns missing and i will get only 4/5 cloumns.
So I want to find what are the columns that are missing and create those columns dynamically with null values.
I don't see functions/ways to extract the output column names and to dynamically create a missing column name by comparing the output name with above list.
Appreciate any help on this.
Thank you
Solved! Go to Solution.
Hi @Lalith27
The Basic Data Profile tool can get this for you, in conjunction with the Select/Unique tools and a Join to a master list of fields. Please see screenshot below and the attached workflow
You could then use this to create the column that was missing.
Edit: Expanded it to include adding in the missing column(s) which also includes a control column for when all original columns match - see revised workflow
HI @Lalith27 as well as the suggestion by @DavidSkaife you can also use the Field Info Tool to get the list of the column names.
You can Use data Profile tool to get the Information Of Columns present and then you can easily compare them with your standard Columns,
HI @Lalith27
If you know exactly the columns required, then appending the API output to the template should add the column and place null in the field missing.
HTH
Tam
Thank you very much David! It worked.