From 3a717c90d04c8e8acbddbde39757f273db7a8d51 Mon Sep 17 00:00:00 2001 From: Diego Fernandez Date: Fri, 13 Dec 2024 10:28:10 -0700 Subject: [PATCH] feat: increase maximum message size 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. --- dbtsl/api/adbc/client/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbtsl/api/adbc/client/base.py b/dbtsl/api/adbc/client/base.py index b75069a..f012607 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: f"{1024 * 1024 * 32}", } def __init__( # noqa: D107