How to set default value for column in Google bigquery table using API from pyhton script

Question:

Class that crate column and describe it doesn’t have "default_value_expression" in the constructor.

path: google/cloud/bigquery/schema.py

class SchemaField:
def __init__(
name: str,
field_type: str,
mode: Any = "NULLABLE",
description: Any = None,
fields: Any = (),
policy_tags: Any = None)

That key is displayed on the google bigquery docs.

But when I try to set the value for any column using this key the error message "Unknow key(s): default_value_expression…" is displayed.

I tried to set a default value from the google cloud console.

Asked By: Faust Pear

||

Answers:

Ensure you’re using the latest version of the library. It was just released in version 3.4.0 a few days ago.

Answered By: shollyman
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.