Configure Log Service input components
The Log Service input component reads data from Log Service data sources. To synchronize data from Log Service to other data sources, configure the Log Service input component to specify the source, and then configure the target data source.
Prerequisites
-
A Log Service data source is created. For more information, see Create a Log Service data source.
-
The account used to configure the Log Service input component must have read-through permission on the data source. If you do not have the permission, request it. 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 a project (in Dev-Prod mode, also 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 Log Service component in the input component list on the right and drag it to the canvas.
-
Click the
icon in the Log Service input component card to open the Log Service Input Configuration dialog box. -
In the Log Service Input Configuration dialog box, configure the parameters.
Parameter
Description
Step Name
The name of the Log Service input component. Dataphin automatically generates a step name, which you can modify. 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 dropdown list displays all Log Service data sources, including those you have read-through permission for and those you do not. Click the
icon to copy the data source name.-
For data sources you do not have read-through permission for, click Request next to the data source to request permission. For more information, see Request, renew, and return data source permissions.
-
If you do not have a Log Service data source, click Create to create one. For more information, see Create a Log Service data source.
Table
You can enter a keyword to search for a table, or enter the exact table name and click Exact Match. Click the
icon to copy the selected table name.Log Start Time
Enter the start time for reading logs. The time format is
yyyyMMddHHmmss.Log End Time
Enter the end time for reading logs. The time format is
yyyyMMddHHmmss.Batch Read Count
The number of records to read per batch. Instead of reading records one by one, configure a batch read count (such as 1,024 records) to reduce interactions with the data source, improve I/O efficiency, and lower network latency.
Output Fields
Displays the output fields.
-
Batch Add Fields.
-
Click Batch Add.
-
JSON format example:
// Example: [{ "index": 0, "name": "user_id", "type": "String" }, { "index": 1, "name": "user_name", "type": "String" }]Noteindexspecifies the column number,namespecifies the field name after import, andtypespecifies the field type after import. For example,"index":3,"name":"user_id","type":"String"imports the fourth column with the field nameuser_idand the field typeString. -
TEXT format example:
// Example: 0,user_id,String 1,user_name,String-
The row delimiter separates field entries. The default is a line feed (\n). Line feed (\n), semicolon (;), and period (.) are supported.
-
The column delimiter separates the field name and field type. The default is a comma (,).
-
-
-
Click OK.
-
-
Create An Output Field.
Click Create Output Field, enter the Source Index and Column, and select the Type for the field. Click a blank area to complete the field creation.
-
Manage output fields.
You can perform the following operations on fields:
-
Click and drag the
icon next to position to change the position of the field. -
Click the Operation
icon in the column to edit an existing field. -
Click the Operation
icon in the column to delete an existing field.
-
-
-
Click OK to complete the configuration of the Log Service input component.