Replies: 1 comment
|
Long-running updates can use those commands, but the One detail in point 1:
If you control both ends, a separate submit/status API with a durable job ID could provide that lifecycle, including the final count or error. That would be an extension rather than something ordinary Flight SQL clients can use automatically. I'd make retry/idempotency and transaction lifetime explicit there: reconnecting after a timeout mustn't accidentally execute the same update twice. |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
Flight SQL defines
CommandStatementUpdateandCommandPreparedStatementUpdateasDoPutoperations. The server consumes the request, executes the statement, and returns aDoPutUpdateResult, usually containing the affected-row count.This works for short-running statements, but I'm looking for an alternative to avoid having to keep long lived connections when running long DML/DDL operations.
PollFlightInfoappears relevant because it supports long-running Flight operations, but Flight SQL does not define how either update command maps toPollFlightInfo.From my understanding, using a similar mechanism for DDL/DML queries is not supported by the protocol because:
DoPut(CommandStatementUpdate/CommandPreparedStatementUpdate)is what binds parametersPutResult(DoPutUpdateResult))I did some research trying to understand if other platforms supported this:
Is there a scenario where
CommandStatementUpdateandCommandPreparedStatementUpdatecan be used for long running queries that I'm missing?All reactions