-
Notifications
You must be signed in to change notification settings - Fork 4
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
[sc-26213] Lower max query text length limit to 100K #859
[sc-26213] Lower max query text length limit to 100K #859
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #859 +/- ##
==========================================
+ Coverage 93.71% 93.89% +0.18%
==========================================
Files 203 161 -42
Lines 19074 18906 -168
==========================================
- Hits 17875 17752 -123
+ Misses 1199 1154 -45 ☔ View full report in Codecov by Sentry. |
I'm confused, the example you gave shows that a |
ack I saw wrong, wait wait |
VALUES
clause for INSERT INTO
expressions that are too longVALUES
clause for INSERT INTO
expressions
@mars-lan can you take another look? updated the pr description and some names in the logic |
Got it. In that case, let's just ignore queries longer than 100k w/o doing any regex magic? |
VALUES
clause for INSERT INTO
expressionsThere 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.
Otherwise LGTM
🤔 Why?
The Snowflake crawler parses query logs from the
QUERY_HISTORY
view, whosequery_text
column is potentially truncated if the value is too long: https://docs.snowflake.com/en/sql-reference/account-usage/query_history(The link says the limit is 100K characters, but in our Snowflake instance we can see a query is parsed that's longer than 100K:
)
From the lineage parser's perspective a truncated expression is an invalid expression. To make lineage parsing possible, just drop the sql queries that are longer than 100K characters long, since it's very likely to be a
INSERT INTO
expression.🤓 What?
Lower max query text length limit to 100_000.
🧪 Tested?
☑️ Checks
pyproject.toml
.