Andrea
02/27/2023, 12:45 AMVinnie
02/27/2023, 8:00 AMNone
. The asset could simply be a query that gets executed remotely (as is the case in dbt assets/models). Partitions are passed to the asset function through the context
variable (check https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/_core/execution/context/compute.py#L84) so you can refer to them in your queries.Andrea
02/27/2023, 11:03 AM@asset(io_manager_key="snowflake_pushdown")
def some_snowflake_table():
query = '''SELECT * FROM some_table INNER JOIN some_other_table'''
return query
with the IOManager worrying about materialising the query into a table in snowflake so the user does not have to do it. Potentially could also add some default metadata (or leave it configurable by the user)Vinnie
02/27/2023, 11:04 AMAndrea
02/27/2023, 11:08 AM