Configure the InfluxDB reader
The InfluxDB reader reads data from an InfluxDB data source. To sync data from InfluxDB to another data source, configure the InfluxDB reader first, and then configure the destination.
Prerequisites
-
An InfluxDB data source is created. For more information, see .
-
Your account has read permission on the data source. If not, apply for it. For more information, see Apply for 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, you must also select an environment.
-
In the navigation pane on the left, click batch integration. In the batch integration list, click the desired batch channel to open its configuration page.
-
In the upper-right corner of the page, click component library to open the component library panel.
-
In the navigation pane on the left of the component library panel, select Reader. In the reader list on the right, find the InfluxDB component and drag it onto the canvas.
-
Click the
icon on the InfluxDB reader card to open the InfluxDB reader configuration dialog box. -
In the InfluxDB reader configuration dialog box, configure the parameters.
Parameter
Description
step name
The name of the InfluxDB reader. Dataphin generates a default step name that you can change. The name must meet the following requirements:
-
It can contain only Chinese characters, letters, underscores (_), and digits.
-
It can be up to 64 characters in length.
data source
Lists all InfluxDB data sources in Dataphin, regardless of whether you have read permission. Click the
icon to copy the data source name.-
If you do not have read permission on a data source, click Apply next to it to request read permission. For more information, see Apply for data source permissions.
-
If no InfluxDB data sources are available, click New Data Source in the drop-down list to create one. For more information, see .
bucket (optional)
Select a bucket from the data source. If no bucket is specified, Dataphin uses the bucket that was entered during data source registration.
measurement
Select or enter the measurement to sync. The name can contain letters, digits, underscores (_), hyphens (-), and periods (.).
start time
The start time of the data range to read. You can specify a relative time, such as
-5m(last 5 minutes),-24h(last 24 hours), or-7d(last 7 days). You can also specify an absolute time, such as2026-01-01T00:00:00Z. For a full data sync, use1970-01-01T00:00:00Z.filter
Enter a Flux filter expression. Only enter the part after the
andkeyword, for example,r.device_id == "dev_001" and r._field == "temperature". Global system variables such as${bizdate}are supported.output field
Displays all fields that match the selected table and filter criteria. You can perform the following operations:
-
add fields in batches. You can add fields in JSON, TEXT, or DDL format.
-
Click add fields in batches.
-
Add fields in batches in JSON format. 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" } ]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"means to import the third column in the file as a field named user_id with the type String. -
Add fields in batches in TEXT format. Example:
// Example: 1,id,int(10),Long,comment1 2,user_name,varchar(255),Long,comment2-
The row delimiter separates each field entry. The default value is a newline character (\n). Other supported delimiters include a newline character (\n), semicolon (;), and period (.).
-
The column delimiter separates the field name and field type. The default value is a comma (,).
-
-
-
Click OK.
-
-
create output field
Click create output field, then enter a field name and select a type as prompted.
-
Manage output fields.
You can perform the following operations on fields:
-
Drag the
move icon next to a field to change its order. -
Click the
edit icon in the Actions column to edit an existing field. -
Click the
delete icon in the Actions column to delete an existing field.
-
-
-
Click Confirm to save the InfluxDB reader configuration.