clay02/14/2023, 6:24 PM
. I can do this and create a DataFrame without a problem, which I return and from which Dagster creates a table in Snowflake.
However, if the following step has
@asset def my_asset(context) -> pd.DataFrame: with context.resources.snowflake.get_connection() as conn: with closing(conn.cursor()) as cursor: q2 = "SELECT * FROM SANDBOX.MY_SCHEMA.MY_TABLE" cursor.execute(q2) df = cursor.fetch_pandas_all() return df
as a dependency, like this...
I get an error:
@asset def my_next_asset(context, my_asset) -> pd.DataFrame: stuff...
Why is it that I can pull the data in to create a DataFrame but the SnowflakeIOManager cannot do it without hints?
dagster._check.CheckError: SnowflakeIOManager does not have a handler for type 'typing.Any'. Has handlers for types '<class 'pandas.core.frame.DataFrame'>'. Please add <class 'pandas.core.frame.DataFrame'> type hints to your assets and ops.
jamie02/14/2023, 7:30 PM
clay02/14/2023, 7:47 PM