-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigQuery: Allow specifying index data type in partial schema to load_table_from_dataframe
.
#9084
BigQuery: Allow specifying index data type in partial schema to load_table_from_dataframe
.
#9084
Conversation
Thought: if an index column is requested, but we end up wanting to return a schema of |
…m_dataframe`. If an index (or level of a multi-index) has a name and is present in the schema passed to `load_table_from_dataframe`, then that index will be serialized and written to the table. Otherwise, the index is omitted from the serialized table.
b04a3c6
to
14e6baa
Compare
…to issue5572-load-dataframe-indexes
Counter-thought: We'll already display a deprecation warning when we have to fallback to automatic schema detection via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, but spotted a few things that are worth checking again IMO.
@tswast Please just blacken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, thanks for the quick updates!
…rame`. (googleapis#9084) * Specify the index data type in partial schema to `load_table_from_dataframe` to include it. If an index (or level of a multi-index) has a name and is present in the schema passed to `load_table_from_dataframe`, then that index will be serialized and written to the table. Otherwise, the index is omitted from the serialized table. * Don't include index if has same name as column name. * Move `load_table_dataframe` sample from `snippets.py` to `samples/`. Sample now demonstrates how to manually include the index with a partial schema definition. Update docs reference to new `load_table_dataframe` sample location.
…rame`. (googleapis#9084) * Specify the index data type in partial schema to `load_table_from_dataframe` to include it. If an index (or level of a multi-index) has a name and is present in the schema passed to `load_table_from_dataframe`, then that index will be serialized and written to the table. Otherwise, the index is omitted from the serialized table. * Don't include index if has same name as column name. * Move `load_table_dataframe` sample from `snippets.py` to `samples/`. Sample now demonstrates how to manually include the index with a partial schema definition. Update docs reference to new `load_table_dataframe` sample location.
Closes #5572.
If an index (or level of a multi-index) has a name and is present in the
schema passed to
load_table_from_dataframe
, then that index will beserialized and written to the table. Otherwise, the index is omitted
from the serialized table.
Remaining items:
ValueError
s for missing / extra columns.samples/load_table_dataframe.py
.