Upload.insert_rows
Upload.insert_rows(rows, *, update_schema=False) → Dict<insertRows response>
Insert rows into the upload. Can only be called on unreleased uploads of type "stream".
Should be called at most once per second, per upload; for increased performance try batching multiple rows into a single request, up to a limit of 10MB per request.
Parameters:
rows
: list<dict<varname, val>>
The rows to insert. A list of dicts, with each dict representing a single row, where the keys are the variable names, and the values are the value for that variable in that row. E.g.,
[{ "var1": 1, "var2": "foo"}, { "var1": None, "var2": "bar" }]
update_schema
: bool, default False
Whether to automatically update the schema as new rows come in, relaxing variable types and adding new variables. If False, an error will be thrown if any of the rows in the insert request would cause a schema update. Note that there is a significant performance overhead to passing update_schema = True
Returns:
Examples
Last updated
Was this helpful?