Exporting to a Json File
The Export to Json File task exports datasets or other Rulex structures to a series of JSON files.
Prerequisites
You must have created a flow;
You must have already imported the dataset to export into the same flow.
Procedure
Drag the Export to Json File task onto the stage.
Connect the task containing the data to export to it.
Double click the Export to Json File task to open it.
Configure the task options as described in the table below in the Options and File Format tasks.
Save and compute the task.
Export to Json File options | |
Parameter Name | Description |
---|---|
Data to be exported | Select what type data you want to export from the list of options. Possible options are:
|
Mode | Select how you want to save the file, either by storing it in a location you will then specify, by sending the file as an e-mail or both ways. If you select to send the file by e-mail, you must then specify the e-mail address in the Recipients for export via email edit box. |
Destination | Choose the filesystem type where to store the exported file. You can choose between a Saved and Custom source. If you choose to export to a Custom source, choose the filesystem type and click on the pencil icon to fill its values, if it must connect to a remote filesystem. |
Files | Enter or browse to the directory where the file will be saved. If you are exporting to an Azure Storage repository you can either:
|
File basename | Enter a name for the file that will be exported. |
Add current date and time as prefix | If selected, the date and timestamp will be added to the start of the file basename as a prefix. |
Add current date and time as suffix | If selected, the date and timestamp will be added to the end of the file basename as a suffix. |
Append data if already exists | If selected, data will be appended to the specified basename if the file already exists, otherwise the original data will be overwritten. |
Recipients for export via email (use comma as separator) | Specify the email addresses where the exported file will be sent, separated by commas. This option will only be valid if you have selected Send via email or Both in the Mode option. |
File Format options | |
File format | Select the format in which you want to export the file: flat, nested or according to the group column. If you select the group option, you must have selected the Group Column option when importing the Json file, in order to create a column which identifies the group of each tag. If you did not select this option in import, Rulex will not be able to identify which group each tag belongs to, and consequently a single group will be created in export. |
Key for types | Specify the attribute which defines the data type. |
Remove missing values | If selected, missing records are removed from the exported file. |
If you want to export to a Local Filesystem, check the dedicated Local Filesystem page.
Specific use case: exporting an HTTP response to SharePoint
When exporting an HTTP response to SharePoint, you need to not only specify the HTTP Server connection parameters, but also the SharePoint connection parameters.
This means that, when following the procedure, you need to insert information on the connection for both the HTTP Server and SharePoint.
You will find all the operations to perform in the procedure below:
In the Export to Json File task, select HTTP Server in the Destination section.
Then, if the source is Custom, click on the pencil button to fill the connection parameters required.
In the Response URI drop down menu, select SharePoint.
In the Response file path, write the SharePoint path where you want the file to be saved.
In the Destination section, select SharePoint in the drop-down list.
Configure the SharePoint parameters required by clicking the pencil button next to the Destination section.
Save and compute the task.