Skip to content

Commit 9130c9f

Browse files
lazebnyialdogonzalez8octavia-squidington-iii
authored
fix(source-google-sheets): add sheet id encoding (#52671)
Co-authored-by: Aldo Gonzalez <aldo.gonzalez@airbyte.io> Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
1 parent b70b57b commit 9130c9f

File tree

7 files changed

+34
-33
lines changed

7 files changed

+34
-33
lines changed

airbyte-integrations/connectors/source-google-sheets/integration_tests/configured_catalog.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"streams": [
33
{
44
"stream": {
5-
"name": "Sheet1-one-col",
5+
"name": "Sheet1 one col&special name%?",
66
"json_schema": {
77
"$schema": "http://json-schema.org/draft-07/schema#",
88
"type": "object",

airbyte-integrations/connectors/source-google-sheets/integration_tests/expected_records.txt

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
{"stream":"Sheet1-one-col","data":{"ID":"aa"},"emitted_at":1673989565000}
2-
{"stream":"Sheet1-one-col","data":{"ID":"bb"},"emitted_at":1673989565000}
3-
{"stream":"Sheet1-one-col","data":{"ID":"1"},"emitted_at":1673989565000}
4-
{"stream":"Sheet1-one-col","data":{"ID":"2"},"emitted_at":1673989565000}
5-
{"stream":"Sheet1-one-col","data":{"ID":"3"},"emitted_at":1673989565000}
6-
{"stream":"Sheet1-one-col","data":{"ID":"4"},"emitted_at":1673989565000}
7-
{"stream":"Sheet1-one-col","data":{"ID":"5"},"emitted_at":1673989565000}
8-
{"stream":"Sheet1-one-col","data":{"ID":"6"},"emitted_at":1673989565000}
9-
{"stream":"Sheet1-one-col","data":{"ID":"7"},"emitted_at":1673989565000}
10-
{"stream":"Sheet1-one-col","data":{"ID":"8"},"emitted_at":1673989565000}
11-
{"stream":"Sheet1-one-col","data":{"ID":"9"},"emitted_at":1673989565000}
12-
{"stream":"Sheet1-one-col","data":{"ID":"10"},"emitted_at":1673989565000}
13-
{"stream":"Sheet1-one-col","data":{"ID":"11"},"emitted_at":1673989565000}
14-
{"stream":"Sheet1-one-col","data":{"ID":"12"},"emitted_at":1673989565000}
15-
{"stream":"Sheet1-one-col","data":{"ID":"13"},"emitted_at":1673989565000}
16-
{"stream":"Sheet1-one-col","data":{"ID":"14"},"emitted_at":1673989565000}
17-
{"stream":"Sheet1-one-col","data":{"ID":"15"},"emitted_at":1673989565000}
18-
{"stream":"Sheet1-one-col","data":{"ID":"16"},"emitted_at":1673989565000}
19-
{"stream":"Sheet1-one-col","data":{"ID":"17"},"emitted_at":1673989565000}
20-
{"stream":"Sheet1-one-col","data":{"ID":"18"},"emitted_at":1673989565000}
21-
{"stream":"Sheet1-one-col","data":{"ID":"19"},"emitted_at":1673989565000}
22-
{"stream":"Sheet1-one-col","data":{"ID":"20"},"emitted_at":1673989565000}
23-
{"stream":"Sheet1-one-col","data":{"ID":"21"},"emitted_at":1673989565000}
1+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"aa"},"emitted_at":1673989565000}
2+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"bb"},"emitted_at":1673989565000}
3+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"1"},"emitted_at":1673989565000}
4+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"2"},"emitted_at":1673989565000}
5+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"3"},"emitted_at":1673989565000}
6+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"4"},"emitted_at":1673989565000}
7+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"5"},"emitted_at":1673989565000}
8+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"6"},"emitted_at":1673989565000}
9+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"7"},"emitted_at":1673989565000}
10+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"8"},"emitted_at":1673989565000}
11+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"9"},"emitted_at":1673989565000}
12+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"10"},"emitted_at":1673989565000}
13+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"11"},"emitted_at":1673989565000}
14+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"12"},"emitted_at":1673989565000}
15+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"13"},"emitted_at":1673989565000}
16+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"14"},"emitted_at":1673989565000}
17+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"15"},"emitted_at":1673989565000}
18+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"16"},"emitted_at":1673989565000}
19+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"17"},"emitted_at":1673989565000}
20+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"18"},"emitted_at":1673989565000}
21+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"19"},"emitted_at":1673989565000}
22+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"20"},"emitted_at":1673989565000}
23+
{"stream":"Sheet1 one col&special name%?","data":{"ID":"21"},"emitted_at":1673989565000}
2424
{"stream":"Sheet2-two-cols","data":{"ID":"a","Name":"a"},"emitted_at":1673989565000}
2525
{"stream":"Sheet2-two-cols","data":{"ID":"b","Name":"b"},"emitted_at":1673989565000}
2626
{"stream":"Sheet2-two-cols","data":{"ID":"c","Name":"c"},"emitted_at":1673989565000}

airbyte-integrations/connectors/source-google-sheets/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data:
1010
connectorSubtype: file
1111
connectorType: source
1212
definitionId: 71607ba1-c0ac-4799-8049-7f4b90dd50f7
13-
dockerImageTag: 0.9.0-rc.1
13+
dockerImageTag: 0.9.0-rc.2
1414
dockerRepository: airbyte/source-google-sheets
1515
documentationUrl: https://docs.airbyte.com/integrations/sources/google-sheets
1616
githubIssueLabel: source-google-sheets

airbyte-integrations/connectors/source-google-sheets/poetry.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

airbyte-integrations/connectors/source-google-sheets/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
33
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
6-
version = "0.9.0-rc.1"
6+
version = "0.9.0-rc.2"
77
name = "source-google-sheets"
88
description = "Source implementation for Google Sheets."
99
authors = [ "Airbyte <contact@airbyte.io>",]

airbyte-integrations/connectors/source-google-sheets/source_google_sheets/manifest.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dynamic_streams:
5151
name: ""
5252
http_method: GET
5353
path: >-
54-
{% if config["spreadsheet_id"] | regex_search("^(https://.*)") %}{{ config["spreadsheet_id"] | regex_search("/([-\\w]{20,})([/]?)") }}{% else %}{{ config["spreadsheet_id"] }}{% endif %}/values:batchGet?ranges={{parameters["sheet_id"]}}!{{stream_partition.start_range}}:{{stream_partition.end_range}}&majorDimension=ROWS&alt=json
54+
{% if config["spreadsheet_id"] | regex_search("^(https://.*)") %}{{ config["spreadsheet_id"] | regex_search("/([-\\w]{20,})([/]?)") }}{% else %}{{ config["spreadsheet_id"] }}{% endif %}/values:batchGet?ranges={{parameters["sheet_id"] | urlencode}}!{{stream_partition.start_range}}:{{stream_partition.end_range}}&majorDimension=ROWS&alt=json
5555
error_handler:
5656
type: DefaultErrorHandler
5757
backoff_strategies:
@@ -85,7 +85,7 @@ dynamic_streams:
8585
sheet_id: ""
8686
http_method: GET
8787
path: >-
88-
{% if config["spreadsheet_id"] | regex_search("^(https://.*)") %}{{ config["spreadsheet_id"] | regex_search("/([-\\w]{20,})([/]?)") }}{% else %}{{ config["spreadsheet_id"] }}{% endif %}?includeGridData=true&ranges={{parameters["sheet_id"]}}!1:1&alt=json
88+
{% if config["spreadsheet_id"] | regex_search("^(https://.*)") %}{{ config["spreadsheet_id"] | regex_search("/([-\\w]{20,})([/]?)") }}{% else %}{{ config["spreadsheet_id"] }}{% endif %}?includeGridData=true&ranges={{parameters["sheet_id"] | urlencode}}!1:1&alt=json
8989
error_handler:
9090
type: CompositeErrorHandler
9191
error_handlers:
@@ -221,7 +221,7 @@ definitions:
221221
description: spreadsheet_id can be either the full url to spreadsheet or the spreadsheet id.
222222
http_method: GET
223223
path: >-
224-
{% if config["spreadsheet_id"] | regex_search("^(https://.*)") %}{{ config["spreadsheet_id"] | regex_search("/([-\\w]{20,})([/]?)") }}{% else %}{{ config["spreadsheet_id"] }}{% endif %}?includeGridData=true&ranges={{stream_partition.sheet_id}}!1:1&alt=json
224+
{% if config["spreadsheet_id"] | regex_search("^(https://.*)") %}{{ config["spreadsheet_id"] | regex_search("/([-\\w]{20,})([/]?)") }}{% else %}{{ config["spreadsheet_id"] }}{% endif %}?includeGridData=true&ranges={{stream_partition.sheet_id | urlencode}}!1:1&alt=json
225225
error_handler:
226226
type: CompositeErrorHandler
227227
error_handlers:

docs/integrations/sources/google-sheets.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ Airbyte batches requests to the API in order to efficiently pull data and respec
187187

188188
| Version | Date | Pull Request | Subject |
189189
|------------|------------|----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
190-
| 0.9.0-rc.1 | 2025-02-03 | [50843](https://github.com/airbytehq/airbyte/pull/50843) | Migrate to low-code |
190+
| 0.9.0-rc.2 | 2025-01-31 | [52671](https://github.com/airbytehq/airbyte/pull/52671) | Fix sheet id encoding |
191+
| 0.9.0-rc.1 | 2025-01-30 | [50843](https://github.com/airbytehq/airbyte/pull/50843) | Migrate to low-code |
191192
| 0.8.5 | 2025-01-11 | [44270](https://github.com/airbytehq/airbyte/pull/44270) | Starting with this version, the Docker image is now rootless. Please note that this and future versions will not be compatible with Airbyte versions earlier than 0.64 |
192193
| 0.8.4 | 2024-12-09 | [48835](https://github.com/airbytehq/airbyte/pull/48835) | Implementing integration tests |
193194
| 0.7.4 | 2024-09-09 | [45108](https://github.com/airbytehq/airbyte/pull/45108) | Google Sheets API errors now cause syncs to fail |

0 commit comments

Comments
 (0)