Skip to content

Commit 693f26f

Browse files
authored
Source Google Ads: optimize check method (#36891)
Signed-off-by: Artem Inzhyyants <[email protected]>
1 parent 0d614c0 commit 693f26f

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

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

+1-1
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: 3.4.0
14+
dockerImageTag: 3.4.1
1515
dockerRepository: airbyte/source-google-ads
1616
documentationUrl: https://docs.airbyte.com/integrations/sources/google-ads
1717
githubIssueLabel: source-google-ads

airbyte-integrations/connectors/source-google-ads/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 = "3.4.0"
6+
version = "3.4.1"
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/source.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ def check_connection(self, logger: logging.Logger, config: Mapping[str, Any]) ->
187187
logger.info(f"Found {len(customers)} customers: {[customer.id for customer in customers]}")
188188

189189
# Check custom query request validity by sending metric request with non-existent time window
190-
for customer in customers:
191-
for query in config.get("custom_queries_array", []):
190+
for query in config.get("custom_queries_array", []):
191+
for customer in customers:
192192
table_name = query["table_name"]
193193
query = query["query"]
194194
if customer.is_manager_account and self.is_metrics_in_custom_query(query):
@@ -215,6 +215,7 @@ def check_connection(self, logger: logging.Logger, config: Mapping[str, Any]) ->
215215
# iterate over the response otherwise exceptions will not be raised!
216216
for _ in response:
217217
pass
218+
break
218219
return True, None
219220

220221
def streams(self, config: Mapping[str, Any]) -> List[Stream]:

docs/integrations/sources/google-ads.md

+1
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ Due to a limitation in the Google Ads API which does not allow getting performan
280280

281281
| Version | Date | Pull Request | Subject |
282282
|:---------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------|
283+
| `3.4.1` | 2024-04-08 | [36891](https://github.com/airbytehq/airbyte/pull/36891) | Optimize `check` method |
283284
| `3.4.0` | 2024-03-19 | [36267](https://github.com/airbytehq/airbyte/pull/36267) | Pin airbyte-cdk version to `^0` |
284285
| `3.3.7` | 2024-03-15 | [36208](https://github.com/airbytehq/airbyte/pull/36208) | Added error message when there is the `unrecognized field` inside of the `custom query` |
285286
| `3.3.6` | 2024-03-01 | [35664](https://github.com/airbytehq/airbyte/pull/35664) | Fix error for new customers for incremental events streams |

0 commit comments

Comments
 (0)