Replace single quotes with double quotes..

{"game_mode":"win_race", "result":"win", "race_time":"45", "air_time": "2"}

http://www.json.org/

select * from `/home/my_login/test.json`

game_mode       result  race_time       air_time
win_race        win     45      2


-----Original Message-----
From: Abel Castellanos [mailto:[email protected]] 
Sent: Thursday, November 02, 2017 4:43 AM
To: [email protected]
Subject: about properly mapping marquet column

I created a parquet file with several columns from spark 2.1.0

On of this column is a map type created based of a dictionary.

I was expecting that i could query this fields exactly in the same way I query 
json data from drill.

The problem the field is read by drill in this format

{"key_value":[{"key":"result","value":"win"},{"key":"game_mode","value":"win_race"},{"key":"air_time","value":"2"},{"key":"race_time","value":"45"}]}

when the original was

{'game_mode':'win_race', 'result':'win', 'race_time':'45', 'air_time': '2'}


Any idea to solve this problem?

-- 

*Abel Castellanos Carrazana*
Data Scientist/Engineer
Barcelona Data Team
Gameloft



This message may contain information that is confidential or privileged. If you 
are not the intended recipient, please advise the sender immediately and delete 
this message. See 
http://www.blackrock.com/corporate/en-us/compliance/email-disclaimers for 
further information.  Please refer to 
http://www.blackrock.com/corporate/en-us/compliance/privacy-policy for more 
information about BlackRock’s Privacy Policy.

For a list of BlackRock's office addresses worldwide, see 
http://www.blackrock.com/corporate/en-us/about-us/contacts-locations.

© 2017 BlackRock, Inc. All rights reserved.

Reply via email to