- Command to delete directory if exists in local file system:
rm -rf order_items
- To copy data from hdfs to local file system:
hadoop fs -get /user/training/sqoop_import/retail_db/order_items .
- To extract schema from file in json format using avro-tools:
avro-tools getschema part-m-00000.avro
- To print first few records from avro file in json format:
avro-tools tojson part-m-00000.avro | more
- To convert avro file to json format:
avro-tools tojson part-m-00000.avro >> part-m-00000.json
Durga Gadiraju
179.Validating avro Files using “avro-tools”
- March 16, 2023
- , 8:58 am
- , Uncategorized