From f9ac3fd7fef0782900c1666b5b7c1868a9f4a56b Mon Sep 17 00:00:00 2001 From: Ross Briden Date: Tue, 25 Apr 2023 23:51:35 -0700 Subject: [PATCH 1/2] init --- .../online_stores/contrib/mysql_online_store/mysql.py | 7 +++++-- setup.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sdk/python/feast/infra/online_stores/contrib/mysql_online_store/mysql.py b/sdk/python/feast/infra/online_stores/contrib/mysql_online_store/mysql.py index c3bd677e16..7cb7bda18e 100644 --- a/sdk/python/feast/infra/online_stores/contrib/mysql_online_store/mysql.py +++ b/sdk/python/feast/infra/online_stores/contrib/mysql_online_store/mysql.py @@ -190,8 +190,11 @@ def bulk_insert( with conn.cursor() as cur: project = config.project + _drop_table_and_index(cur, project, table) + conn.commit() + for i in range(0, len(data), batch_size): - print(f'Inserting batch {batch} of {batch_size}....') + logging.info(f'Inserting batch {batch} of {batch_size}....') start = time.time() batch = data[i:i + batch_size] rows_to_insert = [] @@ -215,7 +218,7 @@ def bulk_insert( cur.execute(query) conn.commit() end = time.time() - print(f'batch elapsed time: {end - start}') + logging.info(f'batch elapsed time: {end - start}') def online_read( self, diff --git a/setup.py b/setup.py index 5a7eb18db8..4043f35b04 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ from distutils.core import setup NAME = "feast" -VERSION = "0.28+affirm77" +VERSION = "0.28+affirm78" DESCRIPTION = "Python SDK for Feast @ Affirm" URL = "https://github.com/feast-dev/feast" AUTHOR = "Feast" From d98a2814f470acd586d41b6f8285d764fbe07499 Mon Sep 17 00:00:00 2001 From: Ross Briden Date: Tue, 25 Apr 2023 23:52:39 -0700 Subject: [PATCH 2/2] del index drop --- .../infra/online_stores/contrib/mysql_online_store/mysql.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/python/feast/infra/online_stores/contrib/mysql_online_store/mysql.py b/sdk/python/feast/infra/online_stores/contrib/mysql_online_store/mysql.py index 7cb7bda18e..4b75c48509 100644 --- a/sdk/python/feast/infra/online_stores/contrib/mysql_online_store/mysql.py +++ b/sdk/python/feast/infra/online_stores/contrib/mysql_online_store/mysql.py @@ -190,8 +190,6 @@ def bulk_insert( with conn.cursor() as cur: project = config.project - _drop_table_and_index(cur, project, table) - conn.commit() for i in range(0, len(data), batch_size): logging.info(f'Inserting batch {batch} of {batch_size}....')