tDSQL4JSON
Transforms an input JSON data to an output JSON data by using DSQL.
tDSQL4JSON Standard properties
These properties are used to configure tDSQL4JSON running in the Standard Job framework.
The Standard tDSQL4JSON component belongs to the Processing family.
This component is available in Talend Data Management Platform, Talend Big Data Platform, Talend Real-Time Big Data Platform, Talend Data Services Platform and in Talend Data Fabric.
This component is available when you have installed the 8.0.1-R2025-09 Studio Monthly or a later one provided by Talend. For more information, check with your administrator.
Basic settings
Properties | Description |
---|---|
Schema and Edit Schema | A schema is a row description that defines the number of fields (columns) to be processed
and passed on to the next component. Select the type of schema from the
drop-down list:
Click Edit schema to make changes to the schema. If you make changes, the schema automatically becomes built-in. Click Guess schema to retrieve the table schema from the source component. |
Script | Enter a DSQL script to transform your input JSON data. For more information about DSQL,
see Talend Data Shaping Language Reference
Guide. For example, the following DSQL script returns a list of items that are shipped to London: FROM order WHERE shipto.city = 'London' UNNEST item SELECT { orderid, itemno, total_price = quantity * price }. If you use additional operations +, you must enter the script between double quotes. For example: "SELECT a + 1". Note that single comment lines // are not supported in the script, but multi-line comment lines /**/ are supported. Byte array input and Stream input are not supported. For the moment, the DSQL autocomplete is not supported in the script, and the syntax and syntax errors are not highlighted. |
Enable Test Run | Select this check box to preview and validate the results of your DSQL script on a given
file. You need to browse the file in the Sample data
file parameter, and then click Test
Run. Note that if the Test Run output result is more than 65535 bytes, you must disable the check box when your run the Job to avoid errors. |
Advanced settings
Properties | Description |
---|---|
tStatCatcher Statistics | Select this check box to collect the log data at both a Job and component levels. |
Input JSON root name | Enter a name to be used as a reference of the entire JSON in the script. The name must be
unique and not present in the selected input JSON data. By default, the
input name is in. For example, if you write SELECT in in the script, in refers to the all input JSON data. |
Input JSON column | Select a column name that contains the input JSON data in the source component schema from the drop-down list. If the schema contains only one column, this column is used by default. |
Set output JSON column | In case of multiple columns in the output schema, select this check box to choose a
column, and then select the column in the Output JSON
column drop-down list. In case of a single column in the output schema, this column is used by default. If you leave this check box cleared, the JSON result is set to a column with the same name as the input JSON column. If there is no column with the same name, an error appears. |
Enable Java functions calls | Select this check box to enable a Java function call in the DSQL script. For example, you
can call a:
|
Global Variables
Variables | Description |
---|---|
ERROR_MESSAGE |
The error message generated by the component when an error occurs. This is an After variable and it returns a string. |
NB_LINE |
The number of rows processed. This is an After variable and it returns an integer. |
Usage
Usage guidance | Description |
---|---|
Usage rule | This component only supports a single input and single output. |