Skip to content

Interface and Operations / Connectors

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

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

Connector List

Select the "Connectors" tab in the left sidebar to display the list of all added connectors.

connector-aside.png

Using Connectors

Once a connector is added normally, you can use the connector ID in a script to obtain the corresponding connector's operation object.

connector-id.png

Assuming there is a Redis connector with its ID specified as redis, the code to get the connector's operation object is as follows:

Python
1
2
3
redis = DFF.CONN('redis')
redis.query('SET', 'some_key', 'some_value')
print(redis.query('GET', 'some_key'))

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

connector-code-example.png


Reference Documentation

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

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