ChoETL icon indicating copy to clipboard operation
ChoETL copied to clipboard

Json field is causing System.InvalidCastException when converting json to parquet

Open AHirbawi opened this issue 3 years ago • 1 comments

ChoETL.JSON, Version="1.2.1.50" ChoETL.Parquet, Version="1.0.1.24 Having this field "ContainsComments": 0 in the json file is causing the following exception when trying to convert json to parquet System.InvalidCastException: At least one element in the source array could not be cast down to the destination array type.

im using this code to create the parquet file

using var reader = ChoJSONReader.LoadText(testFileContent);
using var writer = new ChoParquetWriter(parquetFilePath).ErrorMode(ChoErrorMode.IgnoreAndContinue);
writer.Write(reader);
writer.Close();

AHirbawi avatar Dec 02 '22 18:12 AHirbawi

pls take https://www.nuget.org/packages/ChoETL.Parquet/1.0.1.25-beta1 and give it try. Let me know.

If you run into issue, pls share more details with sample json. Thanksl

Cinchoo avatar Dec 18 '22 19:12 Cinchoo