Skip to content

Instantly share code, notes, and snippets.

@lightle
Last active April 16, 2024 04:35
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/0d729664737316c6c8d9e7dfb6dc56d3 to your computer and use it in GitHub Desktop.
Save lightle/0d729664737316c6c8d9e7dfb6dc56d3 to your computer and use it in GitHub Desktop.
def model(dbt, session):
dbt.config(materialized="table")
raw_orders_df = dbt.source('dbt_databricks', 'raw_orders')
all_cols = raw_orders_df.columns
return raw_orders_df.select([col for col in all_cols if col.startswith('order') or col.startswith('customer')])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment