The Vertica input component reads data from Vertica data sources. When you need to synchronize data from a Vertica data source to other data sources, you must first configure the source data source information for the Vertica input component to read, and then configure the target data source for data synchronization. This topic describes how to configure a Vertica input component.
Prerequisites
You have created a Vertica data source. For more information, see Create a Vertica data source.
The account used to configure the Vertica input component properties must have the read-through permission on the data source. If you do not have the permission, you need to request the data source permission. For more information, see Request, renew, and return data source permissions.
Procedure
In the top navigation bar of the Dataphin homepage, choose Develop > Data Integration.
In the top navigation bar of the integration page, select Project (In Dev-Prod mode, you need to select an environment).
In the left-side navigation pane, click Batch Pipeline. In the Batch Pipeline list, click the offline pipeline that you want to develop to open its configuration page.
Click Component Library in the upper-right corner of the page to open the Component Library panel.
In the left-side navigation pane of the Component Library panel, select Inputs. Find the Vertica component in the input component list on the right side, and drag it to the canvas.
Click the
icon in the Vertica input component card to open the Vertica Input Configuration dialog box.In the Vertica Input Configuration dialog box, configure the parameters.
Parameter
Description
Step Name
The name of the Vertica input component. Dataphin automatically generates a step name. You can also modify it based on your business scenario. The name must meet the following requirements:
It can contain only Chinese characters, letters, underscores (_), and digits.
It cannot exceed 64 characters in length.
Datasource
The data source dropdown list displays all Vertica data sources in the current Dataphin instance, including those for which you have the read-through permission and those for which you do not. Click the
icon to copy the current data source name.For data sources for which you do not have the read-through permission, you can click Request next to the data source to request the read-through permission. For more information, see Request, renew, and return data source permissions.
If you do not have a Vertica data source, click Create Data Source to create one. For more information, see Create a Vertica data source.
Table
You can enter a table name keyword to search for tables, or enter an exact table name and click Exact Match. After you select a table, the system automatically checks the table status. Click the
icon to copy the name of the selected table.Shard Key (optional)
You can use a column of the integer type in the source data table as the shard key. We recommend that you use the primary key or a column with an index as the shard key. When reading data, the system shards the data based on the configured shard key field to implement concurrent reading, which can improve data synchronization efficiency.
Batch Read Count (optional)
The number of data records to read at a time. When reading data from the source database, you can configure a specific batch read count (such as 1,024 records) instead of reading records one by one. This reduces the number of interactions with the data source, improves I/O efficiency, and reduces network latency.
Input Filter (optional)
The filter condition for extracting data. The configuration instructions are as follows:
Configure a static field to extract the corresponding data, for example,
ds=20210101.Configure a variable parameter to extract a specific part of the data, for example,
ds=${bizdate}.
Output Fields
The Output Fields section displays all fields that match the selected table and filter conditions. You can perform the following operations:
Field Management: If you do not need to output certain fields to downstream components, you can delete these fields:
Delete a single field: If you need to delete a small number of fields, you can click the
icon in the Operation column to delete unnecessary fields.Delete multiple fields in batch: If you need to delete many fields, you can click Field Management. In the Field Management dialog box, select multiple fields, click the
left arrow icon to move the selected input fields to the unselected input fields, and then click OK to complete the batch deletion of fields.
Batch Add: Click Batch Add to configure fields in JSON, TEXT, or DDL format in batch.
NoteAfter you complete the batch addition and click OK, the system will overwrite the configured field information.
Configure fields in JSON format in batch, for example:
// Example: [{ "index": 1, "name": "id", "type": "int(10)", "mapType": "Long", "comment": "comment1" }, { "index": 2, "name": "user_name", "type": "varchar(255)", "mapType": "String", "comment": "comment2" }]Noteindex indicates the column number of the specified object, name indicates the field name after import, and type indicates the field type after import. For example,
"index":3,"name":"user_id","type":"String"indicates that the fourth column in the file is imported, the field name is user_id, and the field type is String.Configure fields in TEXT format in batch, for example:
// Example: 1,id,int(10),Long,comment1 2,user_name,varchar(255),Long,comment2The row delimiter is used to separate the information of each field. The default value is the line feed (\n). The row delimiter can be a line feed (\n), semicolon (;), or period (.).
The column delimiter is used to separate the field name and field type. The default value is a comma (,). The supported delimiter is
','. The field type can be left empty. The default value is','.
Configure fields in DDL format in batch, for example:
CREATE TABLE tablename ( user_id serial, username VARCHAR(50), password VARCHAR(50), email VARCHAR (255), created_on TIMESTAMP, );
Create an output field: Click + Create Output Field, and fill in Column, Type, and Description, and select Mapping Type as prompted. After you complete the configuration of the current row, click the
icon to save it.
Click OK to complete the property configuration of the Vertica input component.