Skip to content

Interface and Operations / Connectors

When users need to access external databases or third-party systems, they can either implement it directly in the code or use the "connector" feature provided by DataFlux Func.

Even without using connectors, users can still normally write Python scripts themselves to access external databases or third-party systems

Connector List

Select the "Connector" tab in the left sidebar to display all added connectors.

Adding a Connector

To add a new connector, select "Add Connector" in the left sidebar, choose the connector type, and fill in the connector ID and its configuration.

The connector ID is the unique identifier for referencing this connector in scripts.

Since many databases are compatible with each other (e.g., MySQL, MariaDB), you can directly use the corresponding compatible connector.

Using a Connector

After adding the connector successfully, you can use the connector ID in the script to get the operation object of the corresponding connector.

Assuming there exists a MySQL connector with an ID specified as mysql, the code to obtain the connector operation object would be:

Python
1
mysql = DFF.CONN('mysql')

You can also directly copy the basic example code from the connector tooltip to reduce keyboard input:


Quote

For more details on how to use connectors within scripts, refer to the documentation Script Development / Connector Object DFF.CONN

Some connectors support subscribing to messages and executing functions; refer to the documentation Script Development / Connector Subscription