Spark SQL : Handling schema evolution -
i want read 2 avro files of same data set schema evolution
- first avro file schema : {string, string, int}
- second avro file schema evolution : {string, string, long}
(int field undergone evolution long) want read these 2 avro file store in dataframe using sparksql.
to read avro files using 'spark-avro' of databicks https://github.com/databricks/spark-avro
how efficiently.
spark version : 2.0.1 scala. 2.11.8
ps. here in example have mentioned 2 files in actual scenario file generated daily there more 1000 such file.
thank in advance:)
use union like
{string,string, [int, long]}
is valid solution your? should allow read both new , old files.
Comments
Post a Comment