79160605

Date: 2024-11-05 20:42:48
Score: 0.5
Natty:
Report link

As far as I know you can’t directly set a sessionID for an insertAll request using the BigQuery Java client. insertAll is designed for streaming inserts and doesn't participate in explicit transactions the same way queries do.

I think a parameterized INSERT statement within your transaction would be a good alternative. This way, you guarantee atomicity of your operations, so either all changes are applied, or none are. This is a better approach for managing multiple changes within a single transaction in BigQuery.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: jggp1094