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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Alpha549
Creator II
Creator II

REST API job : create and send a CSV file via email

Hello,

 

Let's imagine that we have a request : create a REST get endpoint, which trigger an email sending of a CSV file.

 

I have a question : where, what space could be used to create this CSV file before sending it via email ?

Could I create a special folder in <runtime path>/container/data (or somewhere else), and specify this path in the REST API job, to create the CSV file there ? Or, is there a dedicated space for files created by REST API jobs ?

 

This CSV file name could be like : YYYYMMDDHHmmss_uuid_afile.csv

Another question here : how to generate a uuid ?

 

A Data Integration job could automatically delete theses CSV files according to their age (date in their name).

 

Thank you 🙂

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi @Alpha549 Alpha549​ ,

You can generate the CSV file under the container folder of Runtime, eg:

out1.csv

or

data/out1.csv

the CSV file will be created in <runtime installation directory>/container/data.

About UUID, you can generate a UUID string in Java, refer to this page.

 

After the CSV file is sent via email, you should use a tFileDelete to remove the file in the job.

 

Regards

Shong

 

View solution in original post

2 Replies
Anonymous
Not applicable

Hi @Alpha549 Alpha549​ ,

You can generate the CSV file under the container folder of Runtime, eg:

out1.csv

or

data/out1.csv

the CSV file will be created in <runtime installation directory>/container/data.

About UUID, you can generate a UUID string in Java, refer to this page.

 

After the CSV file is sent via email, you should use a tFileDelete to remove the file in the job.

 

Regards

Shong

 

Alpha549
Creator II
Creator II
Author

Thank you @Shicong Hong​ 

 

I'll create files in data/ and then delete them using tFileDelete !

Thank you also for the page concerning UUID generation.

 

Topic solved !