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
Describe the bug
Using JSON_EXTRACT(...) with json field from a sub-query returns an error.
Example query:
select
JSON_EXTRACT(<json_col>, '$.<json_field>') as extracted_field
from
(
select<json_row>.value as<json_col>from<provider>.<service>.<resource>as<alias>
, json_each(<json_array_field>) AS<json_row>
) raw
Returns
query rewriting for indirection:: cannot file col = 'JSON_EXTRACT(<json_col>, '$.<json_field>')'
To Reproduce
Example using the pagerduty resource provider.
select
JSON_EXTRACT(contact_method, '$.html_url') as contact_method_html_url
from
(
selectcontact_method.valueas contact_method
frompagerduty.users.users as pdu
, json_each(contact_methods) AS contact_method
) raw
Returns
stackql exec -i sub-query-cols.iql
query rewriting for indirection: cannot find col = 'JSON_EXTRACT(contact_method, '$.html_url')'
Desktop (please complete the following information):
Describe the bug
Using JSON_EXTRACT(...) with json field from a sub-query returns an error.
Example query:
Returns
To Reproduce
Example using the pagerduty resource provider.
Returns
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: