-
Notifications
You must be signed in to change notification settings - Fork 641
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
This works:
dataset.createTable(tableName, {
schema: 'Name:STRING,Age:INTEGER,Weight:FLOAT,IsMagic:BOOLEAN'
}, callback);Based on the docs:
Schemas can also be specified as a JSON array of fields, which allows for nested and repeated fields. See a Table resource for more detailed information.
Shouldn't this work? (It doesn't as far as I can tell, table is created without a schema.)
dataset.createTable(tableName, {
schema: [
{
"type": "STRING",
"name": "Name"
},
{
"type": "INTEGER",
"name": "Age"
},
{
"type": "FLOAT",
"name": "Weight"
},
{
"type": "BOOLEAN",
"name": "IsMagic"
}
]
}, callback);Perhaps I missed something.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.