-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(ingestion/grafana): fix fails caused by text panels in ingestion #15291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
| raw_sql = "" | ||
| for key, value in target.items(): | ||
| if key.lower() == "rawsql" and value: | ||
| raw_sql = value | ||
| break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about ?
| raw_sql = "" | |
| for key, value in target.items(): | |
| if key.lower() == "rawsql" and value: | |
| raw_sql = value | |
| break | |
| raw_sql = target.get("rawSql") or target.get("rawSQL") or target.get("rawsql") |
any other variant to be considered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The short answer is that this is dictated by the implementation of the individual connector - so, although we've found Athena to be different to Postgres, there may be more, hence why leaving it as flexible would I think be best.
| def _extract_raw_sql_fields_fallback(target: Dict[str, Any]) -> List[SchemaFieldClass]: | ||
| """Fallback basic SQL parsing for when sqlglot fails.""" | ||
| raw_sql = target.get("rawSql", "").lower() | ||
| # Handle case variations: rawSql, rawSQL, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as before
| for target in query_targets: | ||
| if target.get("rawSql"): | ||
| return target["rawSql"] | ||
| # Handle case variations: rawSql, rawSQL, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Uh oh!
There was an error while loading. Please reload this page.