Skip to main content

Added v0.5

This connector allows you to trigger another recipe, from a recipe. Click here for the wrangle equivalent of this connector.

Tabset

Read​

Recipe​

read:
- recipe:
name: my_recipe.wrgl.yml

# Optional
variables:
my_variables: my_value
columns:
- column1
- column2

Function​

from wrangles.connectors import recipe
df = recipe.read('recipe.wrgl.yml')

Parameters​

ParameterRequiredData TypeNotes
name✓strThe name (and path, if required), model id, or url of the recipe to read the data from.
variablesdictA dictionary of custom variables to override placeholders in the recipe. Variables can be indicated as ${MY_VARIABLE}. Variables can also be overwritten by Environment Variables.
columnslistA list with a subset of the columns to import.
order_bystrUses SQL syntax to sort the input.
ifstrA condition that will determine whether the action runs or not as a whole.

Write​

Recipe​

write:
- recipe:
name: my_recipe.wrgl.yml

# Optional
variables:
my_variables: my_value
columns:
- column1
- column2

Function​

from wrangles.connectors import recipe
recipe.write(
df,
name = 'recipe.wrgl.yml'
)

Parameters​

ParameterRequiredData TypeNotes
df✓DataFrameFunction only. DataFrame of contents to write to the database. Columns must match the target schema. By default, if the target table doesn't exist, it will be created.
name✓strThe name (and path, if required), model id, or url of the recipe to read the data from.
variablesdictA dictionary of custom variables to override placeholders in the recipe. Variables can be indicated as ${MY_VARIABLE}. Variables can also be overwritten by Environment Variables.
columnslistA list of the columns to pass to the recipe. If omitted, all columns will be included.
order_bystrUses SQL syntax to sort the output.
ifstrA condition that will determine whether the action runs or not as a whole.

Run​

Recipe​

run:
on_start:
- recipe:
name: my_recipe.wrgl.yml

# Optional
variables:
my_variables: my_value

Function​

from wrangles.connectors import recipe
recipe.run('recipe.wrgl.yml')

Parameters​

ParameterRequiredData TypeNotes
name✓strThe name (and path, if required), model id, or url of the recipe to read the data from.
variablesdictA dictionary of custom variables to override placeholders in the recipe. Variables can be indicated as ${MY_VARIABLE}. Variables can also be overwritten by Environment Variables.
ifstrA condition that will determine whether the action runs or not as a whole.

Wrangles​

Recipe​

wrangles:
- recipe:
name: my_recipe.wrgl.yml

# Optional
variables:
my_variables: my_value

Function​

import wrangles 
wrangles.recipe.run('recipe.wrgl.yml')

Parameters​

ParameterRequiredData TypeNotes
name✓strThe name (and path, if required), model id, or url of the recipe to read the data from.
variablesdictA dictionary of custom variables to override placeholders in the recipe. Variables can be indicated as ${MY_VARIABLE}. Variables can also be overwritten by Environment Variables.
ifstrA condition that will determine whether the action runs or not as a whole.