Skip to content

Instantly share code, notes, and snippets.

@rodigu
Created February 17, 2025 12:12
Show Gist options
  • Save rodigu/7fe697d94849e50e0f8fdbef6b8aa548 to your computer and use it in GitHub Desktop.
Save rodigu/7fe697d94849e50e0f8fdbef6b8aa548 to your computer and use it in GitHub Desktop.
pickling classes in airflow

one of our classes, which made use of the pbipy library, could not be passed through XCom. we were getting the following error: airflow cannot pickle [CLASS] object

the fix involved changing a cfg variable to false:

# Whether to enable pickling for xcom (note that this is insecure and allows for
# RCE exploits).
# Variable: AIRFLOW__CORE__ENABLE_XCOM_PICKLING
enable_xcom_pickling = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment