Reputation: 1127
I'm trying to use the Web UI to extract a create table statement, so that I can see how one might create a nullable repeated column (if possible).
I've managed to make something like that using a query is some context. It created a record column with a mode repeated, which within it had a record column with a mode of nullable. Not sure if that's necessary, and, in any event, I'd like to see how one would go about doing that.
Upvotes: 1
Views: 1622
Reputation: 172944
how one might create a nullable repeated column (if possible)?
below is example of schema to use
[
{
"name": "myCol",
"type": "RECORD",
"mode": "REPEATED",
"fields": [
{
"name": "myNestedCol",
"type": "STRING",
"mode": "NULLABLE"
}
]
}
]
Same with DDL:
#standardSQL
CREATE TABLE `project.dataset.table`
(
myCol ARRAY<STRUCT<myNestedCol STRING>>
)
Upvotes: 1