Data in incorrect format in hive table Avro

Data in incorrect format in hive table Avro
0.0 0


I have imported an RDBMS table as avro and created an hive external table on top of that data.
My code looks like this:
sqoop import
–connect jdbc:mysql:// --username retail_dba --password itversity
–table orders --target-dir /user/phanimandava/orders2
–as-avrodatafile --compress --compression-codec

hdfs dfs -rm orders.avsc
hdfs dfs -put orders.avsc

CREATE EXTERNAL TABLE ORDERS2 STORED AS AVRO LOCATION ‘/user/phanimandava/orders’ TBLPROPERTIES(‘avro.schema.url’=’/user/phanimandava/orders.avsc’);

It displays BigInt values when tried to retrieve order_date.
When issues describe formatted command, it shows:
order_id int
order_date bigint
order_customer_id int
order_status string

I’m wondering if it is the way how avro data will be imported and how .avsc schema describes the data?

Can anyone please help me out how to read right from avsc and apply correct schema to data.


@itversity @vinodnerella can you please have a look at this one?