DB Writer

The DB writer is a spark-based writer component which gives you capability to write data to multiple database sources.

All component configurations are classified broadly into the following sections:

DB Writer configuration for ClickHouse Driver
Configuring DB Writer component for Redshift Driver

Drivers Available

Supported Drivers
  • MySQL

  • Oracle

  • PostgreSQL

  • MS-SQL

  • ClickHouse

  • Snowflake

  • Redshift

Configuring the Meta Information of Azure Writer

  • Database name: Enter the Database name.

  • Table name: Provide a table name where the data has to be written.

  • Enable SSL: Check this box to enable SSL for this components. Enable SSL feature in DB reader component will appear only for three(3) drivers: MongoDB, PostgreSQL and ClickHouse.

  • Certificate Folder: This option will appear when the Enable SSL field is checked-in. The user has to select the certificate folder from drop down which contains the files which has been uploaded to the admin settings. Please refer the below given images for the reference.

  • Schema File Name: Upload a Spark schema file of the data which has to be written in JSON format.

  • Save Mode: Select the save mode from the drop-down menu:

    • Append: It will append the data in the table.

    • Overwrite: It will overwrite the data in the table.

    • Upsert: This operation allows the users to insert a new record or update existing data into a table. For configuring this, we need to provide the Composite Key.

      • Sort Column: This field will appear only when Upsert is selected as Save mode. If there are multiple records with the same composite key but different values in the batch, the system identifies the record with the latest value based on the Sort column. The Sort column defines the ordering of records, and the record with the highest value in the sort column is considered the latest.

    • Column Filter: Enter the column names here. Only the specified columns will be fetched from the data from the previous connected event to the DB Writer. In this field, the user needs to fill in the following information:

      • Name: Enter the name of the column which has to be written from the previous event. The user can add multiple columns by clicking on the "Add New Column" option.

      • Alias: Enter the alias name for the selected column name.

      • Column Type: Enter the data type of the column.

      • Upload: This option allows the user to upload a data file in CSV, JSON, or EXCEL format. The column names will be automatically fetched from the uploaded data file and filled out in the Name, Alias, and Column Type fields.

      • Download Data: This option will download the data filled in the Column Filter field in JSON format.

      • Delete Data: This option will clear all the information filled in the Column Filter field.

    • Query: In this field, we can write a DDL for creating the table in database where the in-event data has to be written. For example, please refer the below image:

Writing a DDL for creating a table in DB.
Sort Column in Upsert Mode for DB Writer (ClickHouse driver)
Meta Information fields of the DB writer (with SSL enabled)

Last updated