Querying S3 CSV file containing JSON fields

Hi,
I am importing via S3 a CSV (actually Tab separated - TSV) resource file, looking like:
1234 true {"foo": " LFRC9000088", "bar": null, "baz": "xxxx"}

Import is ok, Dremio creates a resource, with 3 columns A, B, C, of type ‘text’.
A = 1234
B = true
C = {"foo": " LFRC9000088", "bar": null, "baz": "xxxx"}

I would like to query C."foo" and C."bar", which I could if C was of ‘MAP’ type.

How can I do that ?

1 Like

I managed to make it work by transforming the source data to JSON (rather that Text / TSV).
Then the A, B, C fields are of ‘MAP’ type, and querying C."foo" works.