Skip to main content

OutputAnchor Python Class

Important

This Python SDK uses outdated technology that limits your extension opportunities. We've built a new Platform SDK using Python and the latest open-source technology to deliver a vastly improved development experience. Go to Platform SDK to get started!

The OutputAnchor class is provided as a reference class to extend the class members of a OutputAnchor object instantiated within the running Alteryx process.

Read-Only Attributes

is_closed: Returns "True" if the collection of output connections is closed.

is_initialized: Returns "True" if the collection of output connections is initialized.

is_valid: Returns "True" if the collection of output connections is valid.

Methods

assert_close

Checks to see if the connections were properly closed. This function should be called in pi_close for tools with multiple outputs to make sure that all connections were properly closed as a safety precaution.

assert_close() -> None :

close

Closes all the outgoing connections.

close() -> None :

init

Initializes the OutputAnchor and notifies downstream tools of the outgoing record metadata based on record_info_out.

init((RecordInfo)record_info_out, (str)sort_info_xml='') -> bool :

Returns OutputAnchor.is_valid().

output_record_count

Notifies the Alteryx Engine of the number and size of records that have been sent downstream.

output_record_count((bool)final) -> None :

To limit the number of messages generated for large outputs, this function will only actually send the message if:

  • The record count is less than 256.

  • The record count is a multiple of 256.

  • The final parameter is set to True.

push_record

Pushes record to all output connections managed by the OutputAnchor.

push_record((RecordRef)record, (bool)no_auto_close=False) -> bool :

  • no_auto_close: An option to automatically close completed connections when set to "False".

Returns "False" if there are no open connections to push to.

update_progress

Notifies all downstream tools attached to connections managed by this OutputAnchor to update their progress to the Alteryx Engine.

update_progress((float)percent) -> None :

  • percent_progress: The percent completion for the tool. The percentage must be in the range [0.0,1.0].