-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hive creation failed #5
Comments
This line is wrong:
In other words, an array of what? It looks like your sample is actually an array containing a struct, so maybe something like:
I'll let you finish writing out the struct, but that's the idea. |
Thanks. |
Please provide the CREATE statement you used which is not working. |
Here is the create table statement i used: |
Hi.. |
Are you still getting a parse error? If so, what line number? Provide the whole error message here. |
Yes I get same erro telling the same for issue: FAILED: Parse Error: line 4:2 mismatched input 'data' expecting Identifier near ',' in column specification Thanks , |
Oh, data could be a reserved keyword. Try wrapping it in backticks, i.e.
|
I am trying to generate jar files using "mvn package" but it always freezes as follows. Please can you advise? [INFO] Scanning for projects... |
Hi,
This was so great tool for simplifing the json record into hive structure.
I have created the jar files and used them to generate hive DDL .
But the create table statement is failing in hive.
can you pls help to resolve the issue?
sample data record:
{"country":"uk","state":"ny","city":"fr","street":"nyk","zip":"1009","data":[{"country_code":"uk","state_set":"ny","city_code":"fr","street_code":"nyk","zip_code":"1009"}]}
user@ubuntu:~/lab/programs$ java -jar json-hive-schema-1.0-jar-with-dependencies.jar /home/user/Documents/json_cntry_schema.json
CREATE TABLE x (
city string,
country string,
data array<struct<city_code:string, country_code:string, state_set:string, street_code:string, zip_code:string>>,
state string,
street string,
zip string)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe';
hive> CREATE external TABLE jcountry (
> city string,
> country string,
> data array<struct<city_code:string, country_code:string, state_set:string, street_code:string, zip_code:string>>,
> state string,
> street string,
> zip string)
> ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
> LOCATION '/user/data1/jason/';
FAILED: Parse Error: line 4:2 mismatched input 'data' expecting Identifier near ',' in column specification
Thanks ,
Pushpa
The text was updated successfully, but these errors were encountered: