Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HadhemiDD committed Dec 30, 2024
1 parent e0bf37e commit 1d9404e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duckdb/datadog_checks/duckdb/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ def _execute_query_raw(self, query):
self.log.warning('Failed to fetch records from query: `%s`.', query)
return None
for row in cursor.execute(query).fetchall():
# Try to find the field name or version from the query, anything else would fail
pattern_version = r"\bversion\b"
query_version = re.search(pattern_version, query)
if query_version:
query_name = 'version'
else:
# Try to find the field name from the query
pattern = r"(?i)\bname\s*=\s*'([^']+)'"
query_name = re.search(pattern, query).group(1)
try:
Expand Down

0 comments on commit 1d9404e

Please sign in to comment.