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

[TDL-24367] Fix streams implementation #64

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
937ec47
Update LinkedIn API version from 202302 to 202308
shantanu73 Oct 9, 2023
84ce4dc
Changes:
shantanu73 Oct 20, 2023
661f1ee
Changes:
shantanu73 Oct 20, 2023
aa1ec85
Added relevant search query fields for analytics streams.
shantanu73 Oct 25, 2023
4c0c8bd
Changes:
shantanu73 Nov 1, 2023
393dfb3
Changes:
shantanu73 Nov 2, 2023
13e9490
Modified logic to fetch pivot value from the list.
shantanu73 Nov 6, 2023
ea6e61d
Fixed pylint issues.
shantanu73 Nov 8, 2023
e19aa0e
Fixed pylint for duplicate code.
shantanu73 Nov 8, 2023
57276b1
Fixed streams, sync & transform unit tests.
shantanu73 Nov 8, 2023
cf70819
Added back the logic to tranform audit fields.
shantanu73 Nov 8, 2023
f57f63d
Removed logic to delete Beta fields from Ad analytics streams.
shantanu73 Nov 14, 2023
4397501
Changelog, readme & setup.py changes.
shantanu73 Nov 16, 2023
6bd4e7a
Changes:
shantanu73 Nov 23, 2023
afb2d2f
Added usage for get_config() method in sync_endpoint() method.
shantanu73 Nov 23, 2023
59c5266
Added config instance variable to LinkedInClient class and updated it…
shantanu73 Nov 28, 2023
a00f213
Fixed test_sync unit test as per new config paramter changes.
shantanu73 Nov 28, 2023
f3efe12
Removed get_config method and added config instance variable in Linke…
shantanu73 Nov 28, 2023
d21583e
Fixed test_main & test_sync unit tests as per new config changes.
shantanu73 Nov 28, 2023
754e11f
Changed the order of config parameter in LinkedinClient object.
shantanu73 Nov 28, 2023
cfee98e
Changes:
shantanu73 Nov 28, 2023
afa8785
Changes:
shantanu73 Nov 28, 2023
6d2cc56
[TDL-24282] Fix integration tests (#65)
shantanu73 Nov 29, 2023
80bcf5e
Updated scope information for video_ads stream in new API version upg…
shantanu73 Nov 29, 2023
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
2 changes: 1 addition & 1 deletion tap_linkedin_ads/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
BASE_URL = 'https://api.linkedin.com/rest'
LINKEDIN_TOKEN_URI = 'https://www.linkedin.com/oauth/v2/accessToken'
INTROSPECTION_URI = 'https://www.linkedin.com/oauth/v2/introspectToken'
LINKEDIN_VERSION = '202302'
LINKEDIN_VERSION = '202309'

# set default timeout of 300 seconds
REQUEST_TIMEOUT = 300
Expand Down
12 changes: 0 additions & 12 deletions tap_linkedin_ads/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
# Reference:
# https://github.com/singer-io/getting-started/blob/master/docs/DISCOVERY_MODE.md#Metadata

# The following fields of ads_analytics (...by_campaign and ...by_creative) were previously in beta and are not available on
# API version 202302. Requesting them results in a 403.
# https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting?view=li-lms-2023-02&tabs=http#accuracy
FIELDS_UNACCEPTED_BY_API = {
"average_daily_reach_metrics",
"average_previous_seven_day_reach_metrics",
"average_previous_thirty_day_reach_metrics",
}

def get_abs_path(path):
return os.path.join(os.path.dirname(os.path.realpath(__file__)), path)
Expand All @@ -27,10 +19,6 @@ def get_schemas():
with open(schema_path, encoding='utf-8') as file:
schema = json.load(file)

if stream_name in ('ad_analytics_by_campaign', 'ad_analytics_by_creative'):
for field in FIELDS_UNACCEPTED_BY_API:
metadata.delete(schema, 'properties', field)

schemas[stream_name] = schema
mdata = metadata.new()

Expand Down
108 changes: 44 additions & 64 deletions tap_linkedin_ads/schemas/video_ads.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,110 +5,90 @@
],
"additionalProperties": false,
"properties": {
"account": {
"account_id": {
"type": [
"null",
"integer"
]
},
"status": {
"type": [
"null",
"string"
]
},
"account_id": {
"name": {
"type": [
"null",
"integer"
"string"
]
},
"type": {
"type": [
"null",
"string"
]
},
"account": {
"type": [
"null",
"string"
]
},
"change_audit_stamps": {
"ad_context": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"created": {
"dsc_status": {
"type": [
"null",
"string"
]
},
"dsc_name": {
"type": [
"null",
"string"
]
},
"dsc_ad_type": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"time": {
"type": [
"null",
"string"
],
"format": "date-time"
}
}
"string"
]
},
"last_modified": {
"dsc_ad_account": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"time": {
"type": [
"null",
"string"
],
"format": "date-time"
}
}
"string"
]
}
}
},
"created_time": {
"created_at": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"last_modified_time": {
"last_modified_at": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"content_reference": {
"type": [
"null",
"string"
]
},
"content_reference_ucg_post_id": {
"type": [
"null",
"integer"
]
},
"content_reference_share_id": {
"type": [
"null",
"integer"
]
},
"name": {
"type": [
"null",
"string"
]
},
"owner": {
"id": {
"type": [
"null",
"string"
]
},
"owner_organization_id": {
"type": [
"null",
"integer"
]
},
"type": {
"author": {
"type": [
"null",
"string"
Expand Down
Loading