Skip to content
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

Spark MapType conversion no supported? #13

Closed
kurtmaile opened this issue Apr 24, 2017 · 5 comments
Closed

Spark MapType conversion no supported? #13

kurtmaile opened this issue Apr 24, 2017 · 5 comments

Comments

@kurtmaile
Copy link

Hi,

I have a MapType struct in my schema, and I am getting the error below when converting - I assume then this isnt supported? Is there any (soonish) plans to do so?

Thanks!

java.lang.IllegalArgumentException: Unsupported type: MapType(StringType,BooleanType,true)
at com.samelamin.spark.bigquery.converters.SchemaConverters$.typeToJson(SchemaConverters.scala:73) at com.samelamin.spark.bigquery.converters.SchemaConverters$.com$samelamin$spark$bigquery$converters$SchemaConverters$$fieldToJson(SchemaConverters.scala:81) at com.samelamin.spark.bigquery.converters.SchemaConverters$$anonfun$typeToJson$2.apply(SchemaConverters.scala:64) at com.samelamin.spark.bigquery.converters.SchemaConverters$$anonfun$typeToJson$2.apply(SchemaConverters.scala:64) at ....
@samelamin
Copy link
Owner

Hi @kurtmaile at the moment MapType isnt supported, please feel free to send a pr

The code for the converters can be found here

@kurtmaile
Copy link
Author

Hey thanks - Id love to, not so familiar with the codebase, based on your experience of other types how long and how hard do you think this is (as up against it for time on a PoC but would like to contribute back to your repo :)

@samelamin
Copy link
Owner

Hey @kurtmaile shouldnt take more than an hour or two, just needs to add the maptype to the switch statements and the reverse is true

you have to figure out what the maptype would translate to in BigQuery world

@kurtmaile
Copy link
Author

cool Ill submit the PR in the next few days then - cheers for your help

@samelamin
Copy link
Owner

@kurtmaile thanks! and if you can get a chance can you please rate the package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants