feat: added system test and sample for dataframe contains array#365
feat: added system test and sample for dataframe contains array#365HemangChothani wants to merge 1 commit intogoogleapis:masterfrom
Conversation
|
Here is the summary of changes. You added 1 region tag. |
| # pyarrow 1.0.0 is required for the use of timestamp_as_object keyword. | ||
| "pyarrow >= 1.0.0, < 2.0dev", | ||
| # pyarrow 2.0.0 is required for the use of arrays in dataframe to load the table . | ||
| "pyarrow >= 2.0.0, < 3.0dev", |
There was a problem hiding this comment.
Let's not bump the minimum version here. Most features do work with 1.0, and pyarrow is a core library that is very useful to have a wide range of support.
| None, | ||
| ( | ||
| bigquery.SchemaField( | ||
| "item", "INTEGER", "NULLABLE", None, (), None |
There was a problem hiding this comment.
Hmm... This is a bit of a surprising schema. It appears to match the behavior we were encountering previously. This feature is not supported if we cannot upload directly to a REPEATED INTEGER column.
| # table_id = "your-project.your_dataset.your_table_name" | ||
|
|
||
| dataframe = pandas.DataFrame({"A": [[1, 2, 3], [4, 5, 6], [7, 8, 9]]}) | ||
| job = client.load_table_from_dataframe(dataframe, table_id) # Make an API request. |
There was a problem hiding this comment.
Without an explicit schema, this sample is no different from the generic load_table_from_dataframe sample.
I was imagining system test XOR sample, as they are testing the same behavior.
|
I've sent #368 to capture just the desired It's possible there are some kinds of arrays (such as arrays of records) that are supported, but it appears arrays of scalars still aren't handled correctly. |
Fixes #19