3

I have created Avro table in hive, using presto. using below query

CREATE TABLE  hive.psa_sbox.avro_testing (
id bigint


)
WITH (
   format = 'AVRO',
    external_location = 'my/datalake/data/folder/avro_data',
   avro_schema_url = 'my/datalake/schema/folder/hello.avsc'
)

I can see in presto table is successfully created. But when i tried to query/ view table content it give me below error:

[2021-11-03 12:56:07] Error executing query
[2021-11-03 12:56:07] com.facebook.presto.jdbc.internal.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.facebook.presto.jdbc.internal.common.type.TypeSignature` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
[2021-11-03 12:56:07] at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.facebook.presto.jdbc.internal.client.QueryResults["columns"]->java.util.ArrayList[0]->com.facebook.presto.jdbc.internal.client.Column["typeSignature"]->com.facebook.presto.jdbc.internal.client.ClientTypeSignature["arguments"]->java.util.ArrayList[0]->com.facebook.presto.jdbc.internal.common.type.NamedTypeSignature["typeSignature"])

i found in the blog where a user mentioned we can't create table by giving avro schema as external file but if we give avro schema with in table definition it will work blog link. However i found i cant use avro.schema.literal the only option available to me as per this git repo hive table properties is avro_schema_url and this property only accept location.

any help in this regard.

Maqsood
  • 369
  • 4
  • 17

0 Answers0