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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use tFileInputJSON when deployed.

I'm trying to return dummy data from a REST request/response but I cannot seem to figure out how to upload the JSON (dummy data) from the input file since when I deploy this job the file out.json doesn't get uploaded with it. How can I include my JSON dummy data?0683p000009Ls0M.png

Labels (4)
1 Solution

Accepted Solutions
mayo
Contributor III
Contributor III

The location of the dummy file needs to be a valid location on the server where you deploy the service.  If your local development folder+file location differs from the location you want to use on the deployed server, you can solve this by using a context as a variable to hold the location.  The context can hold your local development folder+file when running it locally.  When deployed, you can manually change this context to represent the deployment server folder+file location.

 

Another way to provide dummy data for local running is with a tFixedFlowInput with Use Inline Content.  Basically you can paste your json text into the Content field as a 1 row, 1 column dataset.  Then use the tExtractJSONFields to parse this out.

 0683p000009Lrwl.png

View solution in original post

2 Replies
mayo
Contributor III
Contributor III

The location of the dummy file needs to be a valid location on the server where you deploy the service.  If your local development folder+file location differs from the location you want to use on the deployed server, you can solve this by using a context as a variable to hold the location.  The context can hold your local development folder+file when running it locally.  When deployed, you can manually change this context to represent the deployment server folder+file location.

 

Another way to provide dummy data for local running is with a tFixedFlowInput with Use Inline Content.  Basically you can paste your json text into the Content field as a 1 row, 1 column dataset.  Then use the tExtractJSONFields to parse this out.

 0683p000009Lrwl.png

Anonymous
Not applicable
Author

Thanks pal, helpful as always.