Custom Python Connections

When creating a Python Connector, you first need to create a Python connection. Custom Python connections work in the same way as Ascend's out-of-the-box connections. Python Read Connectors must pass through a Python Connection in order to access data stores.

The Python connection can contain shared code for all future Python Read connector as well as stored credential configurations. If needed, you can create multiple Python connections with various configurations and credentials. However, a Python read connector can only be associated with single Python connection. Creating a Python Connection requires planning for creating a future Python Read Connector.

A custom Python Connection can contain any code to be shared with a read connector. Running TEST CONNECTION will run the code and attempt to parse any defined functions.

Similarly, a Credential for a Python Connection can contain any text, code, or key-value pair a long as the code inserted into the Python Connection and/or Read Connector can parse it.

Python Read Connectors are created using the same steps as other Ascend Read Connectors. However, there are a few key differences in the fields:

Connector Code Interfaces

Connector Code Interfaces are where the custom Python code is inserted into the Read Connector. Each of the three Connector Code Interfaces have different function definitions. For complete descriptions of definitions, see each interface's reference page, linked below:

Code Fingerprint Strategy

The Code Fingerprint Strategy controls Ascend's DataAware function. Ascend read's the code and the configuration, and calculates the hash of the component. If the code changes in any way, the data must be reprocessed. Currently, the only available setting is Automatic content-based fingerprint.

Schema Generation

The Schema Generation reads the first few rows of the dataset and generates a schema just as with other Ascend Read Connectors. However, in order to sample the dataset, schema generation will run the code inserted into the Connector Code Interface across the entire dataset.