Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi People,
In the attachment is a Automation. I want to flatten the JSON file and insert this in Snowflake. In the Output block you can see what I'm expecting.
I flatten the file in vList. If I want to map a column in vObject I get no output to do so. It must be simple but I don't see it anymore.
Can somebody help me 🙂
Thank you!
Hi @MartijnWanders ,
Do you want to map the values of the Flatten vList in the vObject such that you can output using the output block? Let me know if my understanding is correct.
If so, Did you try using the operation "Set equal to object" in the vObject block? I have updated the automation and shared please have a look.
Let me know if this is what you expected as the output.
Thanks,
Madhushree
Hi Madhushree,
That is exactly what I want but instead of the Output block it must be in the Snowflake Bulk block. That block is expecting a JSON file. I don't know the "Set equal to object" function. I tried but get an error, see below.
Hi @MartijnWanders ,
Yes, the error is due to the column names with a dot.
As we are not able to manipulate the column values, the best approach is to add an object variable(vObject) with hardcoded column values that are accepted by the snowflake, and then add it to a list variable (vList) which should work fine.
I have updated the automation and shared please have a look. Let me know if this solves your issue.
Thanks,
Madhushree
Hi @Madhushree_BP ,
This is almost what I want. How do I make a combination between the flatten option and the vList, vObject and vTableList? I get no output from vList? So I can not map the fields properly in vObject.
If you look at field Tag it's nested. Normally I would place another loop to fetch this data but now I want to do it with the flatten option. So I can delete the extra loop. In my customer case I have a Automation with 5 loops and doesn't work properly at the last one. If we make this example automation work then I can implement this in the real situation.
Do you have a solution for this? Thank you!
Hi @MartijnWanders ,
I have modified the automation and shared the JSON, please have a look.
Please check the column names in your snowflake DB and change them accordingly in your automation. Have a look at the mapped values in vObj.
It is not required to flatten the nested JSON here and also it is not possible to map the list variables(vList) output in this case, If you want to map the values in vObj from vList, you need to add a loop block to do it, and in this scenario, it's not needed because you already have a loop block with all the info.
Thanks!
Hi @Madhushree_BP ,
In my real case I have 5 loops needed to get the data. On the last loop I get a error because it can not itterate on a value field.
For this I created a older threat: https://community.qlik.com/t5/Qlik-Application-Automation/Create-from-value-a-valid-iterable-object-...
I got a solution and Extract data with an QlikSense App. But this isn't the most ideal solution.
This threat was by B option but I understand that isn't possible with the flatten option?
Hi @MartijnWanders ,
What is the error you are getting? Can you please share the screenshot of the same also can we know the exact use case?
Thanks,
Madhushree
Hi @Madhushree_BP ,
In the attachment you can find a screenshot.