health-events.yaml Fix json_extract_scalar issues in lines 37-40#1486
Closed
cedricweider wants to merge 1 commit into
Closed
health-events.yaml Fix json_extract_scalar issues in lines 37-40#1486cedricweider wants to merge 1 commit into
cedricweider wants to merge 1 commit into
Conversation
yprikhodko
approved these changes
May 26, 2026
Contributor
|
Superseding with a wrapper to accommodate possibility that glue makes the field a string. Kind of a Schrödinger's cat issue.
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #1485 :
I was attempting to update the Health Events Dashboard from v2.1.0 to v3.0.0 and got the following error several times, even while trying with cid-cmd update --force.
This issue is present in v4.4.11 (v4.4.12 could not yet be tested as we have another issue deploying it - see issue #1484 )
Athena query status failed : line 37:10: Unexpected parameters (array(varchar), varchar(4)) for function json_extract_scalar. Expected: json_extract_scalar(varchar(x), jsonpath), json_extract_scalar(json, jsonpath)
Looking at the health_events_detail_data table, it appears that the "personas" column is already of type array(varchar) and not json text, so the json_extract_scalar doesn't seem to be needed.
Replacing code in the lines 37-40 with the equivalent TRY(("personas")[X]) "persona_0X" expressions fixed the issue for me.
Description of changes:
I modified the lines 37 to 40 Athena view query definition in dashboards/health-events/health-events.yaml by removing the json_extract_scalar expression.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Best regards,
Cédric Weider