Akira Chang
05/22/2023, 2:29 PMyield
instead of return
to push data into BigQuery
with BigQueryPandasIOManager
?
I have a loop that pushes data into BigQuery
every iteration, so theoretically I would need to use yield
so that the asset won't terminate.
However, I would get this error when using yield
any help would be very helpful!!owen
05/22/2023, 5:31 PMAkira Chang
05/22/2023, 5:43 PMBigQueryIOManager
?owen
05/22/2023, 8:34 PMBigQueryIOManager
is doing is happening here: https://sourcegraph.com/github.com/dagster-io/dagster/-/blob/python_modules/librarie[…]gster_gcp_pandas/bigquery/bigquery_pandas_type_handler.py?L49 (basically just a way to write a dataframe into a bigquery table), so you'd want to adapt that to your use case. The function signature there is a bit different from a regular IOManager's type signature, and rather than try to get into the specifics of why that is (it can get somewhat complicated), I'd recommend just writing your own IOManager from scratch: https://docs.dagster.io/_apidocs/io-managersowen
05/22/2023, 8:34 PMowen
05/22/2023, 10:54 PMAkira Chang
05/24/2023, 6:34 PM