ChoETL icon indicating copy to clipboard operation
ChoETL copied to clipboard

Ability to generate JSON Path

Open zhenyuan0502 opened this issue 2 years ago • 0 comments

Hi @Cinchoo, your library is very good when it could look up and flatten it to Data Table. In my scenario, I would like to transform all fields from a very complex JSON source, let's say these fields would be almost 50-70 columns as well. After flattening them, I will need to get the JSON Path on each necessary field (total fields would be less than the origin) to store and reuse them for the next time.

With very simple JSON, I could treat Name of the Data Table as JSON Path, but currently it would be confused between Dictionary Key as Number and Indexing Number

{ "MyDictionary": { "1": "Value1", "2": "Value2" }, "MyArray": [123, 456] }

Here, these flattened columns are MyDictionary.1, MyDictionary.2, MyArray.1, MyArray.2 I would expect the array name should be MyArray.[1], MyArray.[2] because the above MyArray.1, MyArray.2 will return null value.

I know I could use the Data Table name only, after a general transformation so I actually don't need JSON Path anymore. But I think it would be great if we can be either:

  • Export absolute JSON Path on each field in Reader like this website demo image

  • An option for wrapping index number by brackets MyArray.[1], MyArray.[2]

Thank you and best

zhenyuan0502 avatar Apr 01 '22 11:04 zhenyuan0502