Skip to content

Interface and Operations / Connectors

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

Even without using Connectors, users can normally write Python scripts to access external databases and third-party systems on their own.

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 properly added, users can obtain the corresponding Connector object in the Script using the Connector ID.

connector-id.png

Assuming there is a Redis Connector with the ID specified as redis, the code to obtain the Connector 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 in the Connector prompt box to reduce keyboard input:

connector-code-example.png


Reference Guide

For specific details on how to use Connectors in Scripts, refer to the Guide Script Development / Connector Object DFF.CONN

Some Connectors support subscribing to messages and executing functions. Refer to the Guide Script Development / Connector Subscriptions