From 7bf6de0b407e21aadb93674acd74dd3207d4932a Mon Sep 17 00:00:00 2001 From: Ayush Shah Date: Fri, 22 Oct 2021 20:41:57 +0530 Subject: [PATCH] Sample Usage modified as per Model (#889) * Sample Usage modified as per Model * Resolved - Named Parameters --- .../metadata/ingestion/source/sample_usage.py | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/sample_usage.py b/ingestion/src/metadata/ingestion/source/sample_usage.py index 18d1a6e45a5..318ccef1ae0 100644 --- a/ingestion/src/metadata/ingestion/source/sample_usage.py +++ b/ingestion/src/metadata/ingestion/source/sample_usage.py @@ -48,18 +48,14 @@ class SampleUsageSource(Source): def next_record(self) -> Iterable[TableQuery]: for row in self.query_logs: tq = TableQuery( - row["query"], - "", - 100, - 0, - 0, - "", - "", - datetime.today().strftime("%Y-%m-%d %H:%M:%S"), - 100, - "shopify", - False, - row["query"], + query=row["query"], + user_name="", + starttime="", + endtime="", + analysis_date=datetime.today().strftime("%Y-%m-%d %H:%M:%S"), + database="shopify", + aborted=False, + sql=row["query"], ) yield tq