From f88a0e43ac6d4087a1d3242cd2365db6f38bba6f Mon Sep 17 00:00:00 2001 From: Martin Rueckl Date: Mon, 14 Aug 2023 17:29:58 +0200 Subject: [PATCH 1/2] document un-optimized behaviour of executemany Resolves #196 Signed-off-by: Martin Rueckl --- src/databricks/sql/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/databricks/sql/client.py b/src/databricks/sql/client.py index eed13f1c5..cad4e5926 100644 --- a/src/databricks/sql/client.py +++ b/src/databricks/sql/client.py @@ -526,9 +526,11 @@ def execute( def executemany(self, operation, seq_of_parameters): """ - Prepare a database operation (query or command) and then execute it against all parameter - sequences or mappings found in the sequence ``seq_of_parameters``. + Execute the operation once for every set of passed in parameters. + This will issue N sequential request to the database where N is the length of the provided sequence. + No optimizations of the query (like batching) will be performed. + Only the final result set is retained. :returns self From 11275b1d43e298e9b2ec8109b51bfaaa69fa4701 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Tue, 31 Oct 2023 21:11:00 -0400 Subject: [PATCH 2/2] Black src files Signed-off-by: Jesse Whitehouse --- src/databricks/sql/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/databricks/sql/client.py b/src/databricks/sql/client.py index cad4e5926..bb83a5b6a 100644 --- a/src/databricks/sql/client.py +++ b/src/databricks/sql/client.py @@ -529,8 +529,8 @@ def executemany(self, operation, seq_of_parameters): Execute the operation once for every set of passed in parameters. This will issue N sequential request to the database where N is the length of the provided sequence. - No optimizations of the query (like batching) will be performed. - + No optimizations of the query (like batching) will be performed. + Only the final result set is retained. :returns self