Use a Python function in Pipeline Builder

Beta

Python functions are currently in a beta state and may not be available on all enrollments.

Prerequisites

This guide assumes you have already authored and published a Python function. Review our getting started with Python functions documentation for a tutorial.

Architecture

Python functions run in a Pipeline Builder pipeline as a sidecar container. This means that the function does not need to be deployed and scales dynamically with the size of your pipeline. Embedded functions can be previewed similarly to other transforms in Pipeline Builder.

Use your function in a Pipeline Builder pipeline

Follow the steps below to prepare and configure a Python function in your pipeline:

  1. Open the Pipeline Builder pipeline in which you want to use your Python function.
Python function in Pipeline Builder.
  1. Select Reusables from the upper part of the pipeline graph, then choose User-defined functions.
Reusables button in Pipeline Builder
  1. Select Import UDF and search through the available functions to find the one you want to use.
  2. Choose Add next to the function name. The function should then show as Imported.
Add Python function to Pipeline Builder
  1. Close the import dialogue and select Transform on your Pipeline Builder graph where you would like to use the function.
  2. From the list of transforms, find the UDFs tab to the left to view your imported functions.
  3. Fill out the transform definition specifying the input columns and parameters, then select Apply.
Configured Python function transform in Pipeline Builder.

You should now see your Python function on your Pipeline Builder graph and can preview the output of the function.

Python function in Pipeline Builder