From 07706df1c3e30853b0de7c510a8df33d6f5ce729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Fern=C3=A1ndez=20Giraldo?= Date: Fri, 13 Dec 2024 11:10:25 -0700 Subject: [PATCH] feat: increase maximum message size (#61) A batch can contain up to 1024 rows. If the columns contain large amounts of data (json blogs or free text), the total batch size can exceed the max message size. By doubling this we should be able to accommodate most use cases. TODO: if we hear of people reaching this max, maybe we should make it configurable. --- .changes/unreleased/Features-20241213-104739.yaml | 3 +++ dbtsl/api/adbc/client/base.py | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 .changes/unreleased/Features-20241213-104739.yaml diff --git a/.changes/unreleased/Features-20241213-104739.yaml b/.changes/unreleased/Features-20241213-104739.yaml new file mode 100644 index 0000000..363e326 --- /dev/null +++ b/.changes/unreleased/Features-20241213-104739.yaml @@ -0,0 +1,3 @@ +kind: Features +body: Double the max message size +time: 2024-12-13T10:47:39.843647-07:00 diff --git a/dbtsl/api/adbc/client/base.py b/dbtsl/api/adbc/client/base.py index b75069a..035054b 100644 --- a/dbtsl/api/adbc/client/base.py +++ b/dbtsl/api/adbc/client/base.py @@ -23,6 +23,8 @@ def _extra_db_kwargs(cls) -> Dict[str, str]: return { DatabaseOptions.WITH_COOKIE_MIDDLEWARE.value: "true", f"{DatabaseOptions.RPC_CALL_HEADER_PREFIX.value}user-agent": env.PLATFORM.user_agent, + # double the default max msg size in case of queries with large batches + DatabaseOptions.WITH_MAX_MSG_SIZE.value: f"{1024 * 1024 * 32}", } def __init__( # noqa: D107