Convert XML to CSV configuration file
This is the description of the JSON configuration file for a Convert XML to CSV data operation.
The configuration file is in JSON format. It contains the following sections:
Global parameters: General information about the data operation.
Working folder parameters: Information related to the working folder for the files.
Conversion parameters: Information about the input file to process and the output files generated.
👁️🗨️ Example
Here is an example of Convert XML to CSV configuration file:
🌐 Global parameters
General information about the data operation.
Parameter | Description |
---|---|
$schema type: string optional | The url of the json-schema that contains the properties that your configuration must verify. Most Code Editor can use that to validate your configuration, display help boxes and enlighten issues. |
configuration_type type: string mandatory | Type of data operation. For a Convert XML to CSV data operation, the value is always "xml-conversion". |
configuration_id type: string mandatory | ID of the data operation. You can pick any name you want, but is has to be unique for this data operation type. Note that in case of conflict, the newly deployed data operation will overwrite the previous one. To guarantee its uniqueness, the best practice is to name your data operation by concatenating:
|
environment type: string mandatory | Deployment context. Values: PROD, PREPROD, STAGING, DEV. |
account type: string mandatory | Your account ID is a 6-digit number assigned to you by your Tailer Platform administrator. |
activated type: boolean optional | Flag used to enable/disable the execution of the data operation. If not specified, the default value will be "true". |
archived type: boolean optional | Flag used to enable/disable the visibility of the data operation's configuration and runs in Tailer Studio. If not specified, the default value will be "false". |
doc_md type: string optional | Path to a file containing a detailed description of the data operation. The file must be in Markdown format. |
💼 Working folder parameters
Information related to the input/output working directory in Google Cloud Storage.
Parameter | Description |
---|---|
gcp_project_id type: string mandatory | Google Cloud Platform project ID for the bucket where the data is going to be converted. |
gcs_bucket type: string mandatory | Name of the GCS bucket where the data is going to be converted. |
gcs_working_directory type: string mandatory | Path in the GCS bucket where the input files will be placed, and the output files generated, e.g. "some/sub/dir". |
gcp_credentials_secret type: dict mandatory | Encrypted credentials needed to read and write data in the GCS bucket. You should have generated credentials when setting up GCP. To learn how to encrypt them, refer to this page. |
💱 Conversion parameters
Information about the input file to process and the output files generated.
Parameter | Description |
---|---|
filename_templates type: array mandatory | Array containing one or several filename_template parameters (see below). |
filename_template type: string mandatory | When a file with a name matching the template set here is added to the specified GCS folder, the conversion will be launched automatically. The following placeholders are currently supported:
Example 1 This template:
will allow you to process this type of files: "stores_20201116_124213.txt" Example 2 This template:
will allow you to process this type of files: "20201116_12397_fixedvalue_12312378934.gz" |
file_description type: string mandatory | A short description of the file template entry. |
xsd_schema_file type: string mandatory | Name of the XSD file that will be used to validate the XML file before the conversion. In the current version, only one XSD can be used per XML entry. The XSD file name must be identical to the corresponding XML file name, excluding suffixes. For example "coupon.xsd" can be used to validate "coupon_20210404.xml". |
output_suffix_filters type: array of string optional | Names of the output files to be kept after the conversion. If the XML file contains many child entities, the conversion will create a lot of CSV files (one for each entity). This filter allows you to prevent unnecessary file upload to the output bucket. It works by finding an occurrence of the string in the filename. For example, if a file named "coupon_20210404_advantage.tsv" is generated and the filter "advantage.tsv" was added, then this file will be kept. |
Last updated