From 820d032d6d094e788cd230698825728154c57944 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 21 Aug 2024 11:29:26 -0400 Subject: [PATCH] Clean up remaining issues with hyperd.log generation --- src/pantab/_reader.py | 3 ++- src/pantab/reader.cpp | 2 +- tests/test_writer.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pantab/_reader.py b/src/pantab/_reader.py index 4a22b5e5..1968f881 100644 --- a/src/pantab/_reader.py +++ b/src/pantab/_reader.py @@ -59,7 +59,8 @@ def frames_from_hyper( table_names = [] with tempfile.TemporaryDirectory() as tmp_dir, tab_api.HyperProcess( - tab_api.Telemetry.DO_NOT_SEND_USAGE_DATA_TO_TABLEAU + tab_api.Telemetry.DO_NOT_SEND_USAGE_DATA_TO_TABLEAU, + parameters={"log_config": ""}, ) as hpe: tmp_db = shutil.copy(source, tmp_dir) with tab_api.Connection(hpe.endpoint, tmp_db) as connection: diff --git a/src/pantab/reader.cpp b/src/pantab/reader.cpp index 98c96091..ee0b63ab 100644 --- a/src/pantab/reader.cpp +++ b/src/pantab/reader.cpp @@ -434,7 +434,7 @@ static auto ReleaseArrowStream(void *ptr) noexcept -> void { auto read_from_hyper_query(const std::string &path, const std::string &query) -> nb::capsule { const std::unordered_map params = { - {"log_config", ""}}; + {"log_config", ""}, {"default_database_version", "4"}}; const hyperapi::HyperProcess hyper{ hyperapi::Telemetry::DoNotSendUsageDataToTableau, "", std::move(params)}; hyperapi::Connection connection(hyper.getEndpoint(), path); diff --git a/tests/test_writer.py b/tests/test_writer.py index 7eb4f539..97e6b271 100644 --- a/tests/test_writer.py +++ b/tests/test_writer.py @@ -289,7 +289,8 @@ def test_can_write_wkt_as_geo(tmp_hyper): pt.frame_to_hyper(df, tmp_hyper, table="test", geo_columns=["geography"]) with tab_api.HyperProcess( - tab_api.Telemetry.DO_NOT_SEND_USAGE_DATA_TO_TABLEAU + tab_api.Telemetry.DO_NOT_SEND_USAGE_DATA_TO_TABLEAU, + parameters={"log_config": ""}, ) as hyper: with tab_api.Connection( hyper.endpoint, tmp_hyper, tab_api.CreateMode.CREATE_IF_NOT_EXISTS