From 0cfe6e6cb7aa3d51d47a6d42b83d888c81e7ecc1 Mon Sep 17 00:00:00 2001 From: "Francisco J. Jurado Moreno" <9376816+Beetelbrox@users.noreply.github.com> Date: Wed, 20 Jul 2022 06:34:26 +0200 Subject: [PATCH] [ISSUE-6162] Escape wildcards on revised RS query (#6200) [ISSUE-6162] Escape wildcards on revised RS query (#6200) --- ingestion/src/metadata/utils/sql_queries.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ingestion/src/metadata/utils/sql_queries.py b/ingestion/src/metadata/utils/sql_queries.py index 56c1d2bdb44..5c6ed0d0818 100644 --- a/ingestion/src/metadata/utils/sql_queries.py +++ b/ingestion/src/metadata/utils/sql_queries.py @@ -7,9 +7,9 @@ REDSHIFT_SQL_STATEMENT = """ FROM pg_catalog.stl_query WHERE userid > 1 -- Filter out all automated & cursor queries - AND querytxt NOT ILIKE 'fetch %' - AND querytxt NOT ILIKE 'padb_fetch_sample: %' - AND querytxt NOT ILIKE 'Undoing % transactions on table % with current xid%' + AND querytxt NOT ILIKE 'fetch %%' + AND querytxt NOT ILIKE 'padb_fetch_sample: %%' + AND querytxt NOT ILIKE 'Undoing %% transactions on table %% with current xid%%' AND aborted = 0 AND starttime >= '{start_time}' AND starttime < '{end_time}'