You can build a real-time data warehouse by using the real-time write capability of Hologres.
Prerequisites
A reader or conversion node is configured. For more information, see Data source types that support real-time synchronization.
Background information
The Hologres data sources of the following versions are supported: V0.7, V0.8, V0.9, V0.10, and V.1.1.
Fields of the UUID data type cannot be synchronized.
Procedure
Go to the DataStudio page.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.
In the Scheduled Workflow pane of the DataStudio page, move the pointer over the icon and choose .
Alternatively, find the desired workflow in the Scheduled Workflow pane, right-click the workflow name, and then choose
.In the Create Node dialog box, set the Sync Method parameter to End-to-end ETL and configure the Name and Path parameters.
ImportantThe node name cannot exceed 128 characters in length and can contain only letters, digits, underscores (_), and periods (.).
Click Confirm.
On the configuration tab of the real-time synchronization node, drag Hologres in the Output section to the canvas on the right and draw lines to connect the Hologres node to the input or conversion node that is configured.
Click the Hologres node. In the panel that appears, configure the parameters.
Parameter
Description
Data source
The name of the Hologres data source that you added to DataWorks. You can select only a Hologres data source.
If no Hologres data source is available, you can click New data source to go to the Data Sources page in Management Center to add a Hologres data source. For more information, see Add a Hologres data source.
Table
The name of the Hologres table to which you want to write data.
You can click Create Table on the right to create a table, or click Data preview to preview the selected table.
Dynamic Time Partition
If the Hologres table is a partitioned table, you must specify a dynamic time-based partition.
The dynamic time-based partition parses the value of a source field in the yyyymmddhhmmss format. After the value is parsed, you can use the dynamic partition whose name is a string of variables in the destination table. The destination partition varies based on the value of the source field.
For example, the value of the source field is 20200816, and the name of the destination partition is in the {yyyy}-{mm}-{dd} format. In this case, the value is written to the 2020-08-16 partition.
Job type
The type of the data write operation. Valid values: Replay (Replay Operation Log to Restore Data) and Insert (Archived Storage).
Replay (Replay Operation Log to Restore Data): Hologres Writer performs the same operation on the destination as that performed on the source. For example, if the
INSERT
statement is executed to add a data record to the source, Hologres Writer executes theINSERT
statement to add the same data record to the destination. If theUPDATE
orDELETE
statement is executed in the source, Hologres Writer executes theUPDATE
orDELETE
statement in the destination.Insert (Archived Storage): Hologres Writer uses the destination as streaming data storage. Data is synchronized from the source to the destination by using the
INSERT
statement.
Write conflict policy
The solution to data write conflicts. Valid values: Cover (Overwrite) and Ignore (Ignore).
Cover (Overwrite): Hologres Writer uses the new data synchronized from the source to overwrite the existing data in the destination.
Ignore (Ignore): Hologres Writer ignores the new data synchronized from the source and retains the existing data in the destination.
Mappings
The field mappings between the source and destination. Click Mappings to configure field mappings. The real-time synchronization node synchronizes data based on the field mappings.
In the top toolbar of the configuration tab of the real-time synchronization node, click the icon to save the node.