Commit 45d4cee
authored
docs(samples): Update BigQuery Storage Arrow samples batching logic (#14961)
Bases batching on size rather than row count to avoid exceeding an
internal 10MB limit. Also removes an obsolete assertion in the test.
Thank you for opening a Pull Request! Before submitting your PR, there
are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a
[bug/issue](https://github.com/googleapis/google-cloud-python/issues)
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
Fixes #<issue_number_goes_here> 🦕1 parent 1e3be63 commit 45d4ceeCopy full SHA for 45d4cee
2 files changed
+153-20Lines changed: 153 additions & 20 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/google-cloud-bigquery-storage/samples/pyarrow
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/google-cloud-bigquery-storage/samples/pyarrow/append_rows_with_arrow.py
Copy file name to clipboardExpand all lines: packages/google-cloud-bigquery-storage/samples/pyarrow/append_rows_with_arrow.py+67-20Lines changed: 67 additions & 20 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
16 | 16 | |
17 | 17 | |
18 | 18 | |
19 | | - |
20 | 19 | |
21 | | - |
22 | | - |
23 | 20 | |
24 | | - |
25 | 21 | |
26 | 22 | |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
27 | 27 | |
28 | 28 | |
29 | 29 | |
| ||
100 | 100 | |
101 | 101 | |
102 | 102 | |
103 | | - |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
104 | 107 | |
105 | 108 | |
106 | 109 | |
| ||
160 | 163 | |
161 | 164 | |
162 | 165 | |
163 | | - |
164 | | - |
165 | | - |
166 | | - |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
171 | | - |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
172 | 173 | |
173 | | - |
174 | | - |
| 174 | + |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
175 | 223 | |
176 | 224 | |
177 | 225 | |
| ||
181 | 229 | |
182 | 230 | |
183 | 231 | |
184 | | - |
| 232 | + |
185 | 233 | |
186 | 234 | |
187 | | - |
188 | | - |
| 235 | + |
189 | 236 | |
190 | 237 | |
191 | | - |
| 238 | + |
192 | 239 | |
193 | 240 | |
194 | 241 | |
|
Collapse file
packages/google-cloud-bigquery-storage/samples/pyarrow/test_generate_write_requests.py
Copy file name to clipboard+86Lines changed: 86 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
0 commit comments