From 6288e873d20397767de632f7ae0f3ef20ef13c7e Mon Sep 17 00:00:00 2001 From: Josh lloyd Date: Thu, 11 Jan 2024 17:42:03 -0700 Subject: [PATCH] added some comments --- tap_mysql/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tap_mysql/client.py b/tap_mysql/client.py index ba26e7f..485425a 100644 --- a/tap_mysql/client.py +++ b/tap_mysql/client.py @@ -254,6 +254,9 @@ def discover_catalog_entries(self) -> list[dict]: # inject the table_schema into the list of columns custom_rec_keys = list(custom_rec.keys()) + ["mysql_schema"] + # note that all columns are forced to be strings to avoid + # the complexity of inferring their data types. Warning this could + # cause issues in the loss of precision of data custom_columns = [] for col in custom_rec_keys: custom_columns.append( @@ -375,6 +378,7 @@ def post_process( Returns: The resulting record dict, or `None` if the record should be excluded. """ + # force all values to be strings for simplicity new_row = {k: str(v) for k, v in row.items()} # inject the mysql_schema into the record new_row["mysql_schema"] = self.mysql_schema