Reputation: 6762
I am trying to create/update Schema in BigQuery by passing the below JSON file to bq as
update and Create statements as :
bq mk --table [PROJECT_ID]:[DATASET].[TABLE] [PATH_TO_SCHEMA_FILE]
bq update [PROJECT_ID]:[DATASET].[TABLE] [PATH_TO_SCHEMA_FILE]
SCHEMA_FILE:
[
{
"mode": "REQUIRED",
"name": "cma_id",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "address_id",
"type": "INTEGER"
}
]
Both the above statements are giving error as BigQuery error in mk operation: Invalid value for: REQUIRED is not a valid value
Can someone guide me what Am I Missing in Schema file?
Upvotes: 0
Views: 3382
Reputation: 746
Just not to leave the question unanswered, the issue was an extra space as "mode": "REQUIRED " at one column (see Shivkumar's comment).
Upvotes: 3