Skip to content
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

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions metaphor/snowflake/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# number of query logs to fetch from Snowflake in one batch
DEFAULT_QUERY_LOG_FETCH_SIZE = 100000

# By default ignore queries larger than 512KiB
DEFAULT_MAX_QUERY_SIZE = 512 * 1024
# By default ignore queries longer than 100K characters
usefulalgorithm marked this conversation as resolved.
Show resolved Hide resolved
DEFAULT_MAX_QUERY_SIZE = 100_000


@dataclass(config=ConnectorConfig)
Expand Down
2 changes: 1 addition & 1 deletion metaphor/snowflake/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def _parse_query_logs(
)

# Skip large queries
if len(query_text) >= self._query_log_max_query_size:
if len(query_text) > self._query_log_max_query_size:
continue

# User IDs can be an email address
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metaphor-connectors"
version = "0.14.0"
version = "0.14.1"
usefulalgorithm marked this conversation as resolved.
Show resolved Hide resolved
license = "Apache-2.0"
description = "A collection of Python-based 'connectors' that extract metadata from various sources to ingest into the Metaphor app."
authors = ["Metaphor <[email protected]>"]
Expand Down
Loading