Datahub is a platform designed to process streaming data. You can publish and subscribe to applications for streaming data in Datahub and distribute the data to other platforms. Datahub allows you to analyze streaming data and build applications based on the streaming data.
<dependency> <groupId>com.aliyun.datahub</groupId> <artifactId>aliyun-sdk-datahub</artifactId> <version>2.5.1</version> </dependency>
Create a Datahub writer
- Log on to the DataWorks console. In the left-side navigation pane, click Workspaces. On the Workspaces page, find the target workspace and click Data Analytics in the Actions column.
- On the Data Analytics tab, move the pointer over the icon and choose
You can also find the target workflow, right-click Data Integration, and choose .
- In the Create Node dialog box that appears, set Node Name and Location, and then click Commit.
- On the configuration tab of the created real-time sync node, drag DataHub under to the editing panel. Connect it to the desired reader or transformation node in the panel.
- Click the Datahub writer node and set parameters in the Node Settings section.
Parameter Description Connection The connection to Datahub. In this example, you can only select a Datahub connection.
If no connection is available, click Add Connection on the right to create one on the page.
Topic The name of the topic to which data is written in Datahub. You can click Preview on the right to preview the selected topic. Records per Batch The number of records that are written at a time. Mappings The mappings between fields in the source and destination data stores. DataWorks synchronizes data based on the field mappings.
- Click in the toolbar.