Events [Kafka and Data Sync]

Creating a Kafka Event from the Event Panel

Check out the given illustration to understand how to create a Kafka Event.

Creating a Kafka Event

Follow these steps to create Kafka Event

  • Navigate to the Pipeline Editor page.

  • Click on the Event Panel option in the pipeline toolbar and Click on Add New Event icon.

  • The New Event window opens.

  • Provide a name for the new Event.

  • Select Event Duration: Select an option from the below-given options.

    • Short (4 hours)

    • Medium (8 hours)

    • Half Day (12 hours)

    • Full Day (24 hours)

    • Long (48 hours)

    • Week (168 hours)

Please Note: The event data gets erased after 7 days if no duration option is selected from the available options. The Offsets expire as well.

  • No. of Partitions: Enter a value between 1 to 100. The default number of partitions is 3.

  • No. of Outputs: Define the number of outputs using this field.

  • Is Failover: Enable this option to create the event as the Failover Event. If a Failover Event is created, it must be mapped with a component to retrieve failed data from that component.

  • Click the "Add Event" option.

  • The Event will be created successfully, and the newly created Event is added to the Kafka Events tab in the Events panel.

  • Once the Kafka Event is created, the user can drag it to the pipeline workspace and connect it to any component.

  • On hovering over the event in the pipeline workspace, the user can see the following information for that event.

    • Event Name

    • Duration

    • Number of Partitions

  • The user can edit the following information of the Kafka Event after dragging it to the pipeline workspace:

    • Display Name

    • No. of Outputs

    • Is Failover

Mapping a Failover Event with the component in the pipeline

A Failover Event is designed to capture data that a component in the pipeline fails to process. In cases where a connected event's data cannot be processed successfully by a component, the failed data is sent to the Failover Event.

Follow these steps to map a Failover Event with the component in the pipeline.

  • Create a Failover Event following the provided steps.

  • Drag the Failover Event to the pipeline workspace.

  • Navigate to the Basic Information tab of the desired component where the Failover Event should be mapped.

  • From the drop-down, select the Failover Event.

  • Save the component configuration.

  • The Failover Event is now successfully mapped. If the component encounters processing failures with data from its preceding event, the failed data will be directed to the Failover Event.

  • The Failover Event holds the following keys along with the failed data:

    • Cause: Cause of failure.

    • eventTime: Date and Time at which the data gets failed.

  • When hovering over the Failover Event, the associated component in the pipeline will be highlighted. Refer to the image below for visual reference.

Please see the given video on how to map a Failover Event.

Mapping a Failover Event

Auto connecting Kafka/Data Sync Event to a component

This feature automatically connects the Kafka/Data Sync Event to the component when dragged from the events panel. In order to use this feature, users need to ensure that the Auto connect components on drag option is enabled from the Events panel.

Please see the below given illustrations on auto connecting a Kafka and Data Sync Event to pipeline component.

Auto connecting Kafka Event to a component in a pipeline workflow
Auto connecting Data Sync event to a component in a pipeline workflow

Creating and connecting Kafka/Data Sync Event to a component directly from the Pipeline Workspace

This feature allows user to directly connect a Kafka/Data Sync event to a component by right clicking on the component in the pipeline.

Follow these steps to directly connect a Kafka/Data Sync event to a component in the pipeline:

  • Right-click on the component in the pipeline.

  • Select the Add Kafka Event or Add Sync Event option.

  • The Create Kafka Event or Create Sync Event dialog box will open.

  • Enter the required details.

  • Click on the Add Kafka Event or Create Sync Event option.

  • The newly created Kafka/Data Sync Event will be directly connected to the component.

Please see the below given illustrations on how to add a Kafka and Data Sync Event to pipeline workflow.

Mapped Event

This feature enables users to map a Kafka Event with another Kafka event. In this scenario, the mapped event will have the same data as its source event.

Please see the below given illustrations on how to create mapped Kafka Event.

Follow these steps to create a mapped event in the pipeline:

  • Choose the Kafka event from the pipeline as the source event for which mapped events need to be created.

  • Open the events panel from the pipeline toolbar and select the "Add New Event" option.

  • In the Create Kafka Event dialog box, enable the option at the top to enable mapping for this event.

  • Enter the Source Event Name in the Event name and click on the search icon to select the name of the source event from the suggestions.

  • The Event Duration and No. of Partitions will be automatically filled in the same as the source event. Users can modify the No. of Outputs between 1 to 10 for the mapped event.

  • Click on the Map Kafka Event option to create the Mapped Event.

Please Note: The data of the Mapped Event itself cannot be directly flushed. To clear the data of a Mapped Event, the user needs to flush its Source Event to which it is mapped.

Flushing Events

Kafka Events can be flushed to delete all present records. Flushing an Event retains the offsets of the topic by setting the start-offset value to the end-offset. Events can be flushed by using the Flush Event button beside the respective Event in the Event panel, and all Events can be flushed at once by using the Flush All button. This button is also present at the top of the Event panel.

Connecting an Event to a Component

Check out the given illustration on how to Auto connect a Kafka Event to a pipeline component.

  • Drag any component to the pipeline workspace.

  • Configure all the parameters/fields of the dragged component.

  • Drag the Event from the Events Panel. Once the Kafka event is dragged from the Events panel, it will automatically connect with the nearest component in the pipeline workspace. Please find the below given walk through for the reference.

  • Click the Update Pipeline icon to save the pipeline workflow.

Data Sync Event

Data Sync Event in the Data Pipeline module is used to write the required data directly to the any of the databases without using the Kafka Event and writer components in the pipeline. Please refer the below image for reference:

It can be seen in the above image that Data Event will directly write the data read from the MongoDB reader component to the table of the configured Database in the Data Sync without using a Kafka Event in-between.

Benefits of using the Data Sync Event

  • It doesn't need Kafka event to read the data. It can be connected with any component to read the data and it writes it to the tables of respective databases.

  • Pipeline complexity is reduced because Kafka event and writer is not needed to use in the pipeline.

  • Since, writers are not used, the resource consumption are low.

  • Once Data sync are configured, multiple Data Sync events can be created for the same configuration and the data can be written to multiple tables.

Creating a Data Sync Event

Pre-requisite: Before Creating the Data Sync Event, the user has to configure the Data Sync section under the Settings page.

DB Sync Event enables direct write to the DB that helps in reducing the usage of additional compute resources like Writers in the Pipeline Workflow.

Please Note: The supported drivers for the Data Sync component are as listed below:

  • ClickHouse

  • MongoDB

  • MSSQL

  • MySQL

  • Oracle

  • PostgreSQL

  • Snowflake

  • Redshift

Check out the given video on how to create a Data Sync component and connect it with a Pipeline component.

  • Navigate to the Pipeline Editor page.

  • Click on the DB Sync tab.

  • Click on the Add New Data Sync (+) icon from the Toggle Event Panel.

  • The Create Data Sync window opens.

    • Provide a display name for the new Data Sync.

    • Select the Driver

    • Put a checkmark in the Is Failover option to create a failover Data Sync. In this case, it is not enabled.

  • Click the Save option.

Please Note:

  • Only the configured drivers from the Settings page get listed under the Create Data Sync wizard.

  • The Data Sync component gets created as Failover Data Sync, if the Is Failover option is enabled while creating a Data Sync.

  • Drag and drop Data Sync Event to the workflow editor.

  • Click on the dragged Data Sync component.

  • The Basic Information tab appears with the following fields:

    • Display Name: Display name of the Data Sync

    • Event Name: Event name of the Data Sync

    • Table name: Specify table name.

    • Driver: This field will be pre-selected.

    • Save Mode: Select save mode from the drop-down: Append or Upsert.

    • Composite Key: This field is optional. This field will only appear when upsert is selected as the Save Mode.

    • Click on the Save Data Sync icon to save the Data Sync information.

  • Once the Data Sync Event is dragged from the Events panel, it will automatically connect with the nearest component in the pipeline workflow.

  • Update and activate the pipeline.

  • Open the Logs tab to view whether the data gets written to a specified table.​​

Please Note:

  • In the Save mode, there are two available options.

    • Append

    • Upsert: One extra field will be displayed for upsert save mode i.e. Composite Key.

  • When the SQL component is set to Aggregate Query mode and connected to Data Sync, the data resulting from the query will not be written to the Data Sync Event. Please refer to the following image for a visual representation of the flow and avoid using such scenario.

​Creating a Failover Data Sync

  • Click on the Data Sync tab.

  • Click on the Add New Data Sync (+) icon from the Toggle Event Panel.

  • The Create Data Sync dialog box opens.

  • Provide the Display Name and

  • Enable the Is Failover option.

  • Click the Save option.

  • The failover Data Sync will be created successfully.

Mapping Failover Data Sync to a Component

  • Drag & drop the failover data sync to the pipeline workflow editor.

  • Click on the failover Data Sync and fill in the following field:

    • Table name: Enter the table name where the failed data has to be written.

    • Primary key: Enter the column name which has to be made as the primary key in the table. This field is optional.

    • Save mode: Select a save mode from the given choices. Select either Append or Upsert.

  • The failover Data Sync Event gets configured, now the user can map it with any component in the pipeline workflow.

  • The below-given image displays that the failover Data Sync Event is mapped with the SQL Component.

  • If the component gets failed due to any reason, then it will write all the failed data to the given table of the configured DB in the failover Data Sync.

Please Note: There is no information available on UI that the failover Data Sync Event has been configured while hovering on the failover Data Sync Event.

Last updated