You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Stripe package and have set project variables for fields I want to extract from metadata columns. It works on most values but isn't extracting anything when the key contains a full stop, e.g. plan.id.
I have fixed this locally by adding double quotes to the Snowflake macro:
Hi @LewisDavies thanks so much for opening this issue and sharing the root of the issue and a potential fix. That is interesting that the full stop breaks the macro, but your suggestion seems to make sense to me. I agree with you that I would want to validate the fix on the other platforms as well if we were to roll this fix out in a future release.
Would you mind sharing the original error message (and possibly the compiled snippet where this breaks), and then the equivalent when using this suggested version of the macro and seeing the what the compiled output is and how it succeeds? In the meantime, I will explore recreating the issue with the other platforms and attempt a similar solution.
There's isn't actually an error message, it just returns null. In Snowflake you can access JSON values with dot notation, so without quotes the function is looking for the id field in the plan object.
I suppose my suggested changes could be breaking if some people are using dot notation in their scripts. Fortunately there are other ways of accessing values though.
I'm using the Stripe package and have set project variables for fields I want to extract from
metadata
columns. It works on most values but isn't extracting anything when the key contains a full stop, e.g.plan.id
.I have fixed this locally by adding double quotes to the Snowflake macro:
Happy to make a PR but I'm not sure whether the problem applies to other databases.
The text was updated successfully, but these errors were encountered: