hey - i am trying to use the support for complex t...
# troubleshooting
s
hey - i am trying to use the support for complex type added in 0.8.0 for avro - when i run the example command
bin/pinot-admin.sh AvroSchemaToPinotSchema -timeColumnName fields.hoursSinceEpoch -avroSchemaFile /tmp/test.avsc -pinotSchemaName myTable -outputDir /tmp/test -fieldsToUnnest entries
with the schema in the pr (https://github.com/yupeng9/incubator-pinot/blob/660a70831cf0f7fc5a63c2f2c902c9c1f9[…]pinot-avro-base/src/test/resources/fake_avro_nested_schema.avsc) i get an exception below - any idea what i am doing wrong?
Copy code
Exception caught:

java.lang.RuntimeException: Caught exception while extracting data type from field: entries

                at org.apache.pinot.plugin.inputformat.avro.AvroUtils.extractFieldDataType(AvroUtils.java:252) ~[pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

                at org.apache.pinot.plugin.inputformat.avro.AvroUtils.getPinotSchemaFromAvroSchema(AvroUtils.java:69) ~[pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

                at org.apache.pinot.plugin.inputformat.avro.AvroUtils.getPinotSchemaFromAvroSchemaFile(AvroUtils.java:148) ~[pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

                at org.apache.pinot.tools.admin.command.AvroSchemaToPinotSchema.execute(AvroSchemaToPinotSchema.java:99) ~[pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

                at org.apache.pinot.tools.admin.PinotAdministrator.execute(PinotAdministrator.java:166) [pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

                at org.apache.pinot.tools.admin.PinotAdministrator.main(PinotAdministrator.java:186) [pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

Caused by: java.lang.IllegalStateException: Not one field in the RECORD schema

                at shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:444) ~[pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

                at org.apache.pinot.plugin.inputformat.avro.AvroUtils.extractSupportedSchema(AvroUtils.java:280) ~[pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

                at org.apache.pinot.plugin.inputformat.avro.AvroUtils.extractFieldDataType(AvroUtils.java:247) ~[pinot-all-0.8.0-jar-with-dependencies.jar:0.8.0-c4ceff06d21fc1c1b88469a8dbae742a4b609808]

                ... 5 more
n
@Yupeng Fu ^
y
the schema does not have the path to time column?
s
you mean the
-timeColumnName fields.hoursSinceEpoch
?
ah i sorted this - it is just
hoursSinceEpoch