Snowflake csv export with JSON objects

Hi bringing in csv from Snowflake export with several but not all columns containing JSON objects. Some of the fields in the JSON columns are empty. When I parse JSON, the empty fields create errors.

I can edit in power query because those fields are being imported as text. Not sure what to do in EM.

Can you provide an example?

What errors exactly does it create?

empty row 24

TYPE is text. PERSON is JSON. You can see where the TYPE is OPEN_APPLI… the field for PERSON is empty. When I use PARSE JSON on PERSON, I get an error message that states: “Can’t parse JSON in row #24. Value is the source column is not a text.”

Row 24 is the first instance of an empty field. There are many more. I tried converting to text before, but no luck

You can remove the errors with the “Clean up” action or use an expression in the “Modify column” action.

Yes that’s what I want to do but the parsing stops on the first instance of the error.

In PBI, it just produces errors in the null fields that I can modify

Oh, I see. Try replacing empty values with '{}` before parsing using the “Replace values” action.

We’ll see if we can add an option to not stop parsing on such errors.

1 Like

LOL I just tried it and it works. Great minds :slightly_smiling_face:

One more question. Trying to connect to Snowflake directly.
Warehouse is “COMPUTE_WH”
Database is “PROD_CRM”
Schema is “PUBLIC”
Tables are “Events” and “Rooms”
Connection works fine in Power Query with those parameters and my credentials and host settings. Trying in Easymorph but no luck.

What does "no luck" mean here? Errors? Timeouts? Something else?

7 posts were split to a new topic: Snowflake connection timeout