Skip to main content
The Python connector provides the ability to perform functions or operations that are not otherwise available in the built-in connectors of CData Arc.

Key Capabilities

  • Custom business logic implementation using Python scripting
  • Access to full message context including message headers and file content
  • Integration with external libraries and system commands (Python)
  • Support for complex data transformations and business rule processing

Overview

Python connectors use the Python scripting language to accomplish a wide range of custom behavior. The script configured in the connector is run each time a document is placed in the Transactions tab for the connector. The input document can be read and modified in the script, or the input document can simply trigger the Python script configured in the connector. Python connectors can also be configured to run on a schedule via Receive automation on the Automation tab. After you decide the appropriate task for your Python connector, read the Writing Python documentation to explore how to call various operations.

Connector Configuration

This section contains all of the configurable connector properties.

Python Tab

Options related to writing and testing the script.

Actions

Settings Tab

Configuration

Settings related to the core operation of the connector.
SettingDescription
Connector IdThe static, unique identifier for the connector.
Connector TypeDisplays the connector name and a description of what it does.
Connector DescriptionAn optional field to provide a free-form description of the connector and its role in the flow.

Advanced Settings

Advanced Tab

Message

Message settings determine how the connector searches for messages and manages them after processing.

Note: The settings below are deprecated and hidden by default. They appear only on connectors where they were previously enabled or configured to a non-default value. To retain copies of successfully processed files, right-click the connector in the flow, choose Show Success Path, and connect the success path to a File connector.

SettingDescription
Save to Sent Folder (Deprecated)Copies files processed by the connector to the Sent folder. Disabled by default. Files saved to the Sent folder are not covered by Encryption at Rest.
Sent Folder Scheme (Deprecated)Groups files in the Sent folder by the selected time interval. Only relevant when Save to Sent Folder is enabled.

Logging

Settings that govern the creation and storage of logs.

SettingDescription
Log LevelThe verbosity of logs generated by the connector. When you request support, set this to Debug.
Log Subfolder SchemeInstructs the connector to group files in the Logs folder according to the selected interval. The Weekly option (which is the default) instructs the connector to create a new subfolder each week and store all logs for the week in that folder. Leaving this setting blank tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders helps keep logs organized and improves performance.
Log MessagesCheck this to have the log entry for a processed file include a copy of the file itself. If you disable this, you might not be able to download a copy of the file from the Transactions tab.

Other Settings

Miscellaneous

Miscellaneous settings are for specific use cases.

SettingDescription
Other SettingsEnables you to configure hidden connector settings in a semicolon-separated list (for example, setting1=value1;setting2=value2). Normal connector use cases and functionality should not require the use of these settings.

Automation Tab

Automation Settings

Settings related to the automatic processing of files by the connector.

Automation Status

Performance

Settings related to the allocation of resources to the connector.

SettingDescription
Max WorkersThe maximum number of worker threads consumed from the threadpool to process files on this connector. If set, this overrides the default setting on the Performance Settings portion of the Advanced Settings page.
Max FilesThe maximum number of files sent by each thread assigned to the connector. If set, this overrides the default setting on the Performance Settings portion of the Advanced Settings page.

Alerts Tab

SLAs Tab

Transactions Tab

This tab lists all messages associated with the connector. Use the search bar to find specific messages, or click the funnel icon to apply a filter. You can filter by time, message direction, and/or status. Options on this tab vary depending on the connector’s action type:
  • If your connector is a Trigger, use the Receive button to start the flow.
  • If your connector is a Transform or Terminal, messages that come from a previous connector in the flow automatically appear in the flow, or you can use the Upload Files button to add files.

Producing Output and Log Entries

Python connectors send data to the output feed through the built-in output item, which is pushed automatically when the script finishes — no explicit push is needed. (To push a custom item instead, set its attributes and call _ctx.push(item).) Following are three common use cases. 1 Create and output a file:
2 Pass an input file as output:
3 Write entries to the connector log file:
In a Python connector, print() writes to the log file for the current message (as shown above). To write to the Arc application log instead, use _ctx.log('level', 'message') with a level of DEBUG, INFO, WARNING, or ERROR.

Macros

Examples