Skip to content

Instantly share code, notes, and snippets.

@lightle
Created April 16, 2024 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightle/26b5b208f28c31abfd0560fd4d978c13 to your computer and use it in GitHub Desktop.
Save lightle/26b5b208f28c31abfd0560fd4d978c13 to your computer and use it in GitHub Desktop.
def select_all_filter_by(df, filter_column, filter_value):
return df.filter(f"{filter_column}='{filter_value}'")
def model(dbt, session):
orders_df = dbt.ref('clean_orders')
return select_all_filter_by(orders_df, 'state', 'WA')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment