I have problems creating a simple table using Avro as import format. I would like to create a typical table with N columns of primitive data types, for example a table with columns c1 STRING and c2 INTEGER.
I use schema like this
{
"type": "record",
"name": "x",
"fields": [
{
"name": "c1",
"type": "string"
},
{
"name": "c2",
"type": "int"
}
]
}
This results into one column with name root of type RECORD having nested c1 and c2.
How can import to a table that has two columns c1 and c2 with Avro? Or is it currently possible to only create tables with one column with fixed name root?
I tried other approaches:
- Avro type
array(ofstring) creates one columns with namerootof typeSTRING REPEATED - Simplest schema like
{"type":"string"}creates one column with namerootof typeSTRING. This approach doesn't let create more than one column nor change the name of the column.