From 36ab9aef8ebe8b5ea4c29f7febec91847db31d19 Mon Sep 17 00:00:00 2001 From: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com> Date: Tue, 7 Feb 2023 13:26:22 -0500 Subject: [PATCH] Expose _do_sql as part of osc_ingest_tools public interface (#44) * Expose _do_sql as part of osc_ingest_tools public interface Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com> * Update __init__.py Make isort happy. Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com> * Update trino_utils.py Make black happy. Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com> * Update setup.py Bump version number. Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com> --------- Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com> --- osc_ingest_trino/__init__.py | 3 ++- osc_ingest_trino/trino_utils.py | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osc_ingest_trino/__init__.py b/osc_ingest_trino/__init__.py index b4154c1..c76ac45 100644 --- a/osc_ingest_trino/__init__.py +++ b/osc_ingest_trino/__init__.py @@ -2,7 +2,7 @@ from .dotenv_utils import load_credentials_dotenv from .sqlcols import enforce_partition_column_order, enforce_sql_column_names, sql_compliant_name from .sqltypes import create_table_schema_pairs, pandas_type_to_sql -from .trino_utils import TrinoBatchInsert, attach_trino_engine, fast_pandas_ingest_via_hive +from .trino_utils import TrinoBatchInsert, _do_sql, attach_trino_engine, fast_pandas_ingest_via_hive __all__ = [ "sql_compliant_name", @@ -16,4 +16,5 @@ "attach_trino_engine", "fast_pandas_ingest_via_hive", "TrinoBatchInsert", + "_do_sql", ] diff --git a/osc_ingest_trino/trino_utils.py b/osc_ingest_trino/trino_utils.py index 74b95c8..1dc1599 100644 --- a/osc_ingest_trino/trino_utils.py +++ b/osc_ingest_trino/trino_utils.py @@ -15,6 +15,7 @@ "attach_trino_engine", "fast_pandas_ingest_via_hive", "TrinoBatchInsert", + "_do_sql", ] @@ -70,7 +71,6 @@ def fast_pandas_ingest_via_hive( # noqa: C901 colmap={}, verbose=False, ): - uh8 = uuid.uuid4().hex[:8] hive_table = f"ingest_temp_{uh8}" diff --git a/setup.py b/setup.py index 855bf95..b0bf390 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="osc-ingest-tools", - version="0.4.2", + version="0.4.3", description="python tools to assist with standardized data ingestion workflows for the OS-Climate project", long_description=README, long_description_content_type="text/markdown",