Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Do Not Merge) Source-Google-Ads: GAQL TypeError on Check #55804

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,22 @@ 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 query in config.get("custom_queries_array", []):
for customer in customers:
custom_queries = config.get("custom_queries_array", [])
logger.info(f"custom_queries_array type: {type(custom_queries)}, length: {len(custom_queries) if isinstance(custom_queries, list) else 'N/A'}")

for i, query in enumerate(custom_queries):
logger.info(f"Processing query item {i}, type: {type(query)}")
try:
table_name = query["table_name"]
query = query["query"]
logger.info(f"table_name: {table_name}, type: {type(table_name)}")
logger.info(f"query type: {type(query)}")
except TypeError as e:
logger.error(f"TypeError accessing query item {i}: {e}")
logger.error(f"query item {i} value: {query}")
raise # Re-raise to maintain original error behavior

for customer in customers:
if customer.is_manager_account and self.is_metrics_in_custom_query(query):
logger.warning(
f"Metrics are not available for manager account {customer.id}. "
Expand Down
Loading