Skip to content

Interface and Operations / Connectors

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

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

Connector List

In the left sidebar, select the "Connectors" tab to display a list of all added connectors.

connector-aside.png

Using Connectors

After a connector has been successfully added, you can use the connector ID in scripts to obtain the corresponding connector's operation object.

connector-id.png

Assume there is a Redis connector whose ID is specified as redis, then the code to obtain the connector's operation object would be 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 basic example code from the connector pop-up box to reduce keyboard input:

connector-code-example.png


Reference Documentation

For 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, for more information please refer to the documentation Script Development / Connector Subscription