Skip to content

Commit

Permalink
Merge pull request #33 from AutoIDM/campaign-label
Browse files Browse the repository at this point in the history
Campaign Labels
  • Loading branch information
visch authored Mar 29, 2022
2 parents da1de0a + 13753cd commit 1e0a713
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
64 changes: 64 additions & 0 deletions tap_googleads/schemas/campaign_label.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"type": "object",
"properties": {
"customer": {
"type": "object",
"properties": {
"resourceName": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"campaign": {
"type": "object",
"properties": {
"resourceName": {
"type": "string"
},
"status": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"label": {
"type": "object",
"properties": {
"resourceName": {
"type": "string"
},
"status": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"campaignLabel": {
"type": "object",
"properties": {
"resourceName": {
"type": "string"
},
"campaign": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}
}
13 changes: 13 additions & 0 deletions tap_googleads/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,16 @@ class ConversionsByLocation(ReportsStream):
primary_keys = ["id"]
replication_key = None
schema_filepath = SCHEMAS_DIR / "conversion_by_location.json"

class CampaignLabel(ReportsStream):
"""Conversions By Location"""

gaql = """
SELECT campaign_label.campaign, campaign_label.label, campaign_label.resource_name, campaign.id, campaign.name, campaign.resource_name, campaign.status, customer.id, customer.resource_name, label.name, label.resource_name, label.id, label.status
FROM campaign_label
"""
records_jsonpath = "$.results[*]"
name = "campaign_label"
primary_keys = ["id"]
replication_key = None
schema_filepath = SCHEMAS_DIR / "campaign_label.json"
2 changes: 2 additions & 0 deletions tap_googleads/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
CampaignPerformanceByLocation,
GeotargetsStream,
ConversionsByLocation,
CampaignLabel,
)

STREAM_TYPES = [
Expand All @@ -33,6 +34,7 @@
CampaignPerformanceByLocation,
GeotargetsStream,
ConversionsByLocation,
CampaignLabel,
]


Expand Down

0 comments on commit 1e0a713

Please sign in to comment.