You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
billing: iterate EXTERNAL_LINKS chunks by index, not via next_chunk_index
The previous fix used the EXTERNAL_LINKS disposition but assumed the API
would chain chunks via ``next_chunk_index`` / ``next_chunk_internal_link``.
For multi-chunk responses the Statements API does not actually populate
those fields on the initial response — total_chunk_count says 3 but only
chunk 0's link is included, and next_chunk_index is null. Result: we
only downloaded ~327k of the ~807k product rows (about 40% data loss).
Fix: explicitly loop chunk_index from 1 to manifest.total_chunk_count-1
and fetch each via /api/2.0/sql/statements/{sid}/result/chunks/{i}.
Chunk 0 still comes from the initial response (no extra round-trip).
Log expected vs collected row count for visibility.
Co-authored-by: Isaac
0 commit comments