serialization - Reading AVRO or JSON records in redshift -
i serializing , deserializing data using avro. save serialized data s3. trying read data in s3 redshift, unable read it.
tried avro format
s3 records -
{"breachid":"0eb3130c-241a-461b-99ab-4910301fa012","metricname":"sic_fast_track","regionid":"1","marketplace":"1","glproductgroup":"14","snapshotdate":"2017-09-11","breachdate":"2017-08-14","year":2017,"baseweeknumber":29,"weeknumber":29}
command @ redshift end -
copy test 's3://test/test.avro' credentials 'aws_iam_role=arn:aws:iam::355548666665:role/my_iam_role' format avro 'auto';
error @ redshift - [
amazon](500310) invalid operation: invalid avro file details: ----------------------------------------------- error: invalid avro file code: 8001 context: cannot init avro reader s3 file incorrect avro container file magic number query: 1210354 location: avropath_request.cpp:432 process: query24_642 [pid=113227] -----------------------------------------------;
tried json format
s3 records -
{"breachid":"31847d29-e542-4468-b32e-33cfb3a191b2","metricname":"sic_fast_track","regionid":"1","marketplace":"1","glproductgroup":"14","snapshotdate":"2017-09-11","breachdate":"2017-08-14","year":2017,"baseweeknumber":29,"weeknumber":29}
copy command @ redshift -
copy test 's3://test/test.json' credentials 'aws_iam_role=arn:aws:iam::355548666665:role/my_iam_role' format json 'auto'
output @ redshift -
1 row partial data uploaded in table.
i unable understand do. can here?
Comments
Post a Comment