You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I initially register a csv file using con.register
[ins] In [81]: movielens=con.register("/home/gil/data/movielens/ratings.csv", table_name="movielens")
[ins] In [82]: movielensOut[82]:
AlchemyTable: movielenscolumn0int32imdb_idint32ratingint32
This looks correct but imdb_id is actually a string column and I haven't told DuckDB to sample enough rows to detect that. But if I use ALL_VARCHAR=True to force all columns to load as strings, the returned table has the same schema as before:
[ins] In [83]: movielens=con.register(
...: "/home/gil/data/movielens/ratings.csv", table_name="movielens", ALL_VARCHAR=True
...: )
[ins] In [84]: movielensOut[84]:
AlchemyTable: movielenscolumn0int32imdb_idint32ratingint32
But if I register and change the underlying table name, the new schema is reflected:
[ins] In [85]: movielens=con.register(
...: "/home/gil/data/movielens/ratings.csv", table_name="_movielens", ALL_VARCHAR=True
...: )
[ins] In [86]: movielensOut[86]:
AlchemyTable: _movielenscolumn0stringimdb_idstringratingstring
The underlying call is CREATE OR REPLACE VIEW -- the view is being replaced in DuckDB
I initially register a
csvfile usingcon.registerThis looks correct but
imdb_idis actually a string column and I haven't told DuckDB to sample enough rows to detect that. But if I useALL_VARCHAR=Trueto force all columns to load as strings, the returned table has the same schema as before:But if I register and change the underlying table name, the new schema is reflected:
The underlying call is
CREATE OR REPLACE VIEW-- the view is being replaced inDuckDBbut something in duckdb-engine or ibis seems to be caching the alchemy table schema.
The text was updated successfully, but these errors were encountered: