Custom functions may be used within any part of a recipe.
To use a custom function, specify custom.<function name> within the recipe.
# recipe.wrgl.yml
read:
- custom.my_function:
my_paramater: my_value
import wrangles
def my_function(my_parameter):
# get data from somewhere
return df
wrangles.recipe.run('recipe.wrgl.yml', functions=[my_function])
Custom functions must be structured in a specific way to be used within a recipe. Learn how to structure a function for each section: