Downloading Files¶
Data Federation provides a visual interface for developers to download data as .zip files from data sources.
Prerequisites¶
The download channel has been created and the channel is running
The channel has been authorized to the specified application
Downloading File from Data Source¶
Take the following steps to download file with SQL statement from a data source that is bound to a channel.
Log in EnOS Management Console, select Data Federation > Federation Download, and click New Download Job.
In the Basic Information section, complete the basic configuration of the download job.
Channel: Select the running download channel for downloading file.
Data Source: Select the data source type and alias (currently supporting HIVE(EnOS) data source).
- Download SQLEnter the SQL statement for querying data and downloading the file.
Note
If the SQL statement has double quotes or back quotes, it needs to be escaped with
\
before each double quote or back quote. For example:"asd"
in select * from table id=”asd” needs to be changed to:\"asd\"
.
SA: Select the application that is authorized to use the channel.
Job Name: Enter the file download job name.
zip File Name: Enter name of the downloaded file.
Custom Parameter: (Optional) Enter the required custom parameters.
(Optional) In the Download File Configuration section, complete configuration of the downloaded file.
Save File by Parts: Specify whether to save the downloaded file by parts (If the downloaded file size is big, you can choose to save the file by parts, for example, splitting the file according to time and dates).
Table Header: Enter the header names in the downloaded file, separated by comma.
Delimiter: Select the field delimiter.
Encoding: Select the file encoding format (UTF-8 or GBK).
File Name: If you choose to save the downloaded file by parts, enter the file part names in the format of
{"part1":"name1","part2":"name2","part3":"name3"}
.
Click OK to complete the file download job configuration. The created job will start running automatically. You can monitor the status of the file download job. Time needed by a file download job depends on the number of running jobs and the amount of data to be downloaded.
When the download job runs successfully, you can click the Download icon in the upper right corner of the job list and copy the download URL to the web browser to download the file.
If the file download job is not needed, you can click the Delete icon in the upper right corner of the job list to delete the job. The deleted job configuration and downloaded file cannot be restored. Please operate with caution.