Databricks SQL ExecuteStatement Failing During Chunked Updates to a Single Cell (Large JSON Field)

未关闭
#592 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
python, sql, sqlalchemy
领域
database

调研方向

从报告中描述的 SQLAlchemy 和 Databricks SQL ExecuteStatement 路径开始,然后使用一个大型 JSON 字段重现分块 UPDATE 序列。比较失败时的请求大小,并检查 connector 对重试代码 429 和 503 的处理。完成的标准是记录请求限制和一种获批准的增量更新实践。

由索引模型根据 Issue 内容生成。

描述

We’re encountering issues with Databricks SQL when attempting to update a row that contains a large JSON array field. Originally, we tried inserting the entire JSON directly into the column, but this failed due to request size limitations.
To address that, we redesigned the approach to:

  • Split the full JSON into smaller chunks (~100 items)
  • Append each chunk incrementally to the same row/column using separate UPDATE statements
  • Commit each chunk using a new thread and session to ensure SQLAlchemy thread safety

Despite chunking, the request eventually fails when the dmt_data field grows large enough (presumably ~1–2MB compressed). The SQL API returns:

pgsqlCopyEdit(databricks.sql.exc.RequestError) Error during request to server. 
ExecuteStatement command can only be retried for codes 429 and 503 

This confirms that each UPDATE's request body is still exceeding Databricks SQL's internal limits, even though we’re only appending small pieces.
What We’re Looking For:

  • Confirmation of the exact request body size limit for INSERT/UPDATE operations over Databricks SQL
  • Recommended practice for incrementally updating a single JSON column that grows over time
主要语言
Python
星标
233
派生
152
平均合并
21 小时 5 分钟
30 天内合并 PR
10

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

databricks/databricks-sql-python 的其他 Issue

查看 databricks/databricks-sql-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。