Skip to content

Commit c669993

Browse files
authored
fix(source-google-ads): Fix schema loader for custom queries (#69837)
1 parent b85b63b commit c669993

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ data:
1111
connectorSubtype: api
1212
connectorType: source
1313
definitionId: 253487c0-2246-43ba-a21f-5116b20a2c50
14-
dockerImageTag: 4.1.1
14+
dockerImageTag: 4.1.2
1515
dockerRepository: airbyte/source-google-ads
1616
documentationUrl: https://docs.airbyte.com/integrations/sources/google-ads
1717
externalDocumentationUrls:

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

Lines changed: 1 addition & 1 deletion
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 = "4.1.1"
6+
version = "4.1.2"
77
name = "source-google-ads"
88
description = "Source implementation for Google Ads."
99
authors = [ "Airbyte <[email protected]>",]

airbyte-integrations/connectors/source-google-ads/source_google_ads/components.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,10 @@ def _get_list_of_fields(self) -> List[str]:
840840
"""
841841
query_upper = self.query.upper()
842842
select_index = query_upper.find("SELECT")
843-
from_index = query_upper.find("FROM")
843+
match = re.search(r"\bFROM\b", query_upper)
844+
if not match:
845+
raise ValueError("Could not find a valid FROM clause in query")
846+
from_index = match.start()
844847

845848
fields_portion = self.query[select_index + 6 : from_index].strip()
846849

docs/integrations/sources/google-ads.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ Due to a limitation in the Google Ads API which does not allow getting performan
335335

336336
| Version | Date | Pull Request | Subject |
337337
|:------------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
338+
| 4.1.2 | 2025-11-24 | [69837](https://github.com/airbytehq/airbyte/pull/69837) | Fix schema loader for custom queries |
338339
| 4.1.1 | 2025-11-21 | [69802](https://github.com/airbytehq/airbyte/pull/69802) | Fix custom query regex conditions |
339340
| 4.1.0 | 2025-11-20 | [69776](https://github.com/airbytehq/airbyte/pull/69776) | Promoting release candidate 4.1.0-rc.8 to a main version. |
340341
| 4.1.0-rc.8 | 2025-10-29 | [69084](https://github.com/airbytehq/airbyte/pull/69084) | Fix criterion streams |

0 commit comments

Comments
 (0)