Skip to content

Commit

Permalink
fix(source-google-sheets): add sheet id encoding (#52671)
Browse files Browse the repository at this point in the history
Co-authored-by: Aldo Gonzalez <[email protected]>
Co-authored-by: Octavia Squidington III <[email protected]>
  • Loading branch information
3 people authored Jan 31, 2025
1 parent b70b57b commit 9130c9f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"streams": [
{
"stream": {
"name": "Sheet1-one-col",
"name": "Sheet1 one col&special name%?",
"json_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{"stream":"Sheet1-one-col","data":{"ID":"aa"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"bb"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"1"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"2"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"3"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"4"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"5"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"6"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"7"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"8"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"9"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"10"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"11"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"12"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"13"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"14"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"15"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"16"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"17"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"18"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"19"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"20"},"emitted_at":1673989565000}
{"stream":"Sheet1-one-col","data":{"ID":"21"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"aa"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"bb"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"1"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"2"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"3"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"4"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"5"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"6"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"7"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"8"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"9"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"10"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"11"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"12"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"13"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"14"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"15"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"16"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"17"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"18"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"19"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"20"},"emitted_at":1673989565000}
{"stream":"Sheet1 one col&special name%?","data":{"ID":"21"},"emitted_at":1673989565000}
{"stream":"Sheet2-two-cols","data":{"ID":"a","Name":"a"},"emitted_at":1673989565000}
{"stream":"Sheet2-two-cols","data":{"ID":"b","Name":"b"},"emitted_at":1673989565000}
{"stream":"Sheet2-two-cols","data":{"ID":"c","Name":"c"},"emitted_at":1673989565000}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: file
connectorType: source
definitionId: 71607ba1-c0ac-4799-8049-7f4b90dd50f7
dockerImageTag: 0.9.0-rc.1
dockerImageTag: 0.9.0-rc.2
dockerRepository: airbyte/source-google-sheets
documentationUrl: https://docs.airbyte.com/integrations/sources/google-sheets
githubIssueLabel: source-google-sheets
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "0.9.0-rc.1"
version = "0.9.0-rc.2"
name = "source-google-sheets"
description = "Source implementation for Google Sheets."
authors = [ "Airbyte <[email protected]>",]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dynamic_streams:
name: ""
http_method: GET
path: >-
{% 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
{% 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
error_handler:
type: DefaultErrorHandler
backoff_strategies:
Expand Down Expand Up @@ -85,7 +85,7 @@ dynamic_streams:
sheet_id: ""
http_method: GET
path: >-
{% 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
{% 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
error_handler:
type: CompositeErrorHandler
error_handlers:
Expand Down Expand Up @@ -221,7 +221,7 @@ definitions:
description: spreadsheet_id can be either the full url to spreadsheet or the spreadsheet id.
http_method: GET
path: >-
{% 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
{% 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
error_handler:
type: CompositeErrorHandler
error_handlers:
Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/sources/google-sheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ Airbyte batches requests to the API in order to efficiently pull data and respec

| Version | Date | Pull Request | Subject |
|------------|------------|----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.9.0-rc.1 | 2025-02-03 | [50843](https://github.com/airbytehq/airbyte/pull/50843) | Migrate to low-code |
| 0.9.0-rc.2 | 2025-01-31 | [52671](https://github.com/airbytehq/airbyte/pull/52671) | Fix sheet id encoding |
| 0.9.0-rc.1 | 2025-01-30 | [50843](https://github.com/airbytehq/airbyte/pull/50843) | Migrate to low-code |
| 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 |
| 0.8.4 | 2024-12-09 | [48835](https://github.com/airbytehq/airbyte/pull/48835) | Implementing integration tests |
| 0.7.4 | 2024-09-09 | [45108](https://github.com/airbytehq/airbyte/pull/45108) | Google Sheets API errors now cause syncs to fail |
Expand Down

0 comments on commit 9130c9f

Please sign in to comment.