Skip to main content

JSON to Table v.2

Current configuration of the JSON to Table v.2 task in the Workflow Designer
  • Task type: json-to-table_v2

Description

The "JSON to Table v.2" task allows you to import a tabular JSON object directly into a table in a supported database. The task handles the creation of the table or the insertion of data into existing tables.

1. Database Connection

Target Table

Select the source of the configuration:

  • Manual: to enter connection data field by field.
  • Environment: to use a preconfigured connection environment in the system.

Environment Connection

Dropdown menu to select the desired environment (e.g., SqlServer_TEST). Authentication parameters are populated automatically.

Input Dataset

Field to define the data source:

  • Must contain the JSON to be processed.
  • Dynamic parameters can be used to link the output of previous tasks (e.g., #>JSON print.result<#).

Database Type

Select the destination DBMS from PostgreSQL, SQLserver, MySQL, Oracle and SAP HANA.

SSL Connection

Indicates whether to enable secure connection (YES / NO).

Authentication

If in Manual mode, fill in the fields: Host, Port, DB Name, User and Password.

2. Table Management

Target Table Action

  • Create Table: generates a new table in the database.
  • Existing Table: inserts data into an existing table. Options:
  • Append: adds records to the end.
  • Truncate Insert: empties the table before insertion.
  • Create Table if not exists: creates the table only if not detected, avoiding errors in multiple executions.

Target Table Name

Specifies the physical name of the table in the database (e.g., example_table).

3. Tabular Structure

In this tab, you define the mapping between JSON keys and table columns.

FieldDescription
TypeDefines the data type (STRING, NUMERIC, DATE, DATE AND TIME).
PrecisionMaximum length for strings or digits for numerics.
AliasName of the column in the database. Use double quotes (e.g., "User Name") to preserve spaces or special characters.
JSONPath ExpressionThe JSON path to extract the value (e.g., $.task_name).

Table Structure Management

Three buttons are present at the bottom right of the Tabular Structure:

ButtonAction
SaveSaves the defined structure
ImportImports an existing structure
ExportExports the defined structure

This feature allows you to save, export or reuse mappings, avoiding manual field completion and reducing the risk of errors.

Technical Note

Visibility: Structures saved in the system are visible exclusively to the user who created them. Further Reading: For a detailed description of all options and operating logic, refer to the Table Structure page.

4. Configuration Example

To import a JSON dataset such as the following: [{"task_name": "Backup", "status": "OK"}, {"task_name": "Restore", "status": "FAIL"}]

Configuration of the Tabular Structure:

TypePrecisionAliasJSONPath Expression
STRING1000name$.task_name
STRING1000status$.status

Output Parameters

  • exitStatus: Operation status code (0 = Success).
  • rowCount: Number of rows actually inserted into the database.
  • targetTable: Name of the destination table used.
  • DataExportCsv: Processed data exported in CSV format.
  • DataExportJson: Processed data exported in JSON format.
  • DataColumn.ColumnName: List of all column values separated by commas (e.g. Backup, Restore).
  • resultJson: Complete JSON report of the task execution.

resultJson Example

{
"run_info": {
"status": "Completed",
"run_result": "Success"
},
"output_parameters": {
"exitStatus": "0"
}
}