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
Got this error while updating a dataset. It's not a big deal and i called the method create_column() to update a table schema,but it's somewhat out of the Dataset concept i guess, columns are created on the go.
As i see, there is the relative issue #352 and the fact that update_many() doesn't handle ensure keyword argument at all.
I think a way to improve the insert_many(), upsert_many(), update_many() methods is to add a new wrapper _sync_columns_many() and move there the block of code:
# Sync table before inputting rows.sync_row= {}
forrowinrows:
# Only get non-existing columns.sync_keys=list(sync_row.keys())
forkeyin [kforkinrow.keys() ifknotinsync_keys]:
# Get a sample of the new column(s) from the row.sync_row[key] =row[key]
self._sync_columns(sync_row, ensure, types=types)
What do you think about? It doesn't look difficult to fix and i could implement it, gratefully tests are on the place.
The text was updated successfully, but these errors were encountered:
Got this error while updating a dataset. It's not a big deal and i called the method
create_column()
to update a table schema,but it's somewhat out of the Dataset concept i guess, columns are created on the go.As i see, there is the relative issue #352 and the fact that
update_many()
doesn't handleensure
keyword argument at all.I think a way to improve the
insert_many(), upsert_many(), update_many()
methods is to add a new wrapper_sync_columns_many()
and move there the block of code:What do you think about? It doesn't look difficult to fix and i could implement it, gratefully tests are on the place.
The text was updated successfully, but these errors were encountered: