Skip to content

Commit

Permalink
Source Google Ads: optimize check method (#36891)
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
  • Loading branch information
artem1205 committed Apr 8, 2024
1 parent 0d614c0 commit 693f26f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 253487c0-2246-43ba-a21f-5116b20a2c50
dockerImageTag: 3.4.0
dockerImageTag: 3.4.1
dockerRepository: airbyte/source-google-ads
documentationUrl: https://docs.airbyte.com/integrations/sources/google-ads
githubIssueLabel: source-google-ads
Expand Down
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 = "3.4.0"
version = "3.4.1"
name = "source-google-ads"
description = "Source implementation for Google Ads."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def check_connection(self, logger: logging.Logger, config: Mapping[str, Any]) ->
logger.info(f"Found {len(customers)} customers: {[customer.id for customer in customers]}")

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

def streams(self, config: Mapping[str, Any]) -> List[Stream]:
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/google-ads.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ Due to a limitation in the Google Ads API which does not allow getting performan

| Version | Date | Pull Request | Subject |
|:---------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------|
| `3.4.1` | 2024-04-08 | [36891](https://github.com/airbytehq/airbyte/pull/36891) | Optimize `check` method |
| `3.4.0` | 2024-03-19 | [36267](https://github.com/airbytehq/airbyte/pull/36267) | Pin airbyte-cdk version to `^0` |
| `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` |
| `3.3.6` | 2024-03-01 | [35664](https://github.com/airbytehq/airbyte/pull/35664) | Fix error for new customers for incremental events streams |
Expand Down

0 comments on commit 693f26f

Please sign in to comment.