Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
MigueldelCampo
Contributor III
Contributor III

Creating a CSV file from JSON using Qlik SaaS Automation

Hi everyone,
I’m working on a Qlik SaaS Automation and need to convert a JSON file (table) (from Onedrive) into a CSV file. Has anyone successfully done this in Automation? If so, could you guide me on the steps or provide an example? Any advice on how to map the JSON structure to CSV columns would be greatly appreciated!

Thanks in advance!

Miguel. 

1 Solution

Accepted Solutions
diegozecchini
Specialist
Specialist

Hi !

Here some steps could be useful

1-Get the file from OneDrive, in Qlik Application Automation, create a new automation using the OneDrive Connector to get the JSON file from OneDrive. You can use the "Get File" block or "Download File" to retrieve the content.
2-Parse the JSON structure.
3-Use a loop to extract each JSON object and map it to CSV columns.
4-Create and store the CSV file in OneDrive.

If you're running into specific challenges, such as JSON structures or handling complex mappings, feel free to share more details

View solution in original post

3 Replies
tolange
Partner Ambassador
Partner Ambassador

Hi Miguel, not sure if QAA is the best tool for this but what you could do is read the json in QAA, use the custom code block to transform its content into the format you need for the csv and then create the csv file & write to it line by line in the file location of choice.

MigueldelCampo
Contributor III
Contributor III
Author

Could you provide more details on how the custom code block in QAA should be structured to transform the JSON into the required CSV format? an example of how to handle nested fields in the JSON during this process?

diegozecchini
Specialist
Specialist

Hi !

Here some steps could be useful

1-Get the file from OneDrive, in Qlik Application Automation, create a new automation using the OneDrive Connector to get the JSON file from OneDrive. You can use the "Get File" block or "Download File" to retrieve the content.
2-Parse the JSON structure.
3-Use a loop to extract each JSON object and map it to CSV columns.
4-Create and store the CSV file in OneDrive.

If you're running into specific challenges, such as JSON structures or handling complex mappings, feel free to share more details