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

πŸŽ‰ Source Pinterest: filters for entity statuses #15074

Merged
merged 61 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
bb082bb
solve conflicts
marcosmarxm Sep 6, 2022
f315c5b
solve conflict in json schema
marcosmarxm Sep 6, 2022
2b3d081
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 13, 2022
5177bbd
bump to version 0.1.8 for the changes of this pr
drewrasm Oct 13, 2022
7d023a3
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 20, 2022
dbe27ce
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 20, 2022
e584ef9
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 20, 2022
bce2db6
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 24, 2022
42bc53c
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 24, 2022
c18da01
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 24, 2022
5233413
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 27, 2022
aae82aa
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 28, 2022
5ef4bba
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Oct 31, 2022
f82c997
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 1, 2022
f97736b
change ad account id in the schemas
drewrasm Nov 1, 2022
221cff6
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 1, 2022
77c1815
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 1, 2022
709610a
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 1, 2022
3bd1e98
query to include data plane attributes (#18531)
xiaohansong Nov 1, 2022
35ddeba
Fix unit tests in source relational db (#18789)
tuliren Nov 1, 2022
562c99e
ci: use custom test-reporter action to upload job results (#18004)
Nov 1, 2022
cd1fffd
Correct coinmarket spec (#18790)
marcosmarxm Nov 1, 2022
e494879
Parameterize test_empty_streams and test_stream_with_1_airbyte_column…
grishick Nov 1, 2022
b1ec6d5
πŸ› Source Facebook Marketing: reduce request limit after specific erro…
artem1205 Nov 1, 2022
3ad7424
[charts/airbyte-cron] Cleanup env vars (#18787)
perangel Nov 1, 2022
b37266d
Use equalsIgnoreCase (#18810)
jdpgrailsdev Nov 1, 2022
a3bebaa
Bump helm chart version reference to 0.40.40 (#18815)
github-actions[bot] Nov 1, 2022
b2ee04d
πŸ›Destination Google Sheets: Fix empty headers list (#18729)
lazebnyi Nov 1, 2022
65b5ed0
πŸ›Source Exchange Rates: Fix handling error during check connection (#…
lazebnyi Nov 1, 2022
c613102
Add normalization changelog and bump normalization version in platfor…
grishick Nov 1, 2022
42e3efe
Remove ConfigPersistence usage from SecretsMigrator (#18747)
cgardens Nov 1, 2022
300051d
remove config persistence from seeding logic (#18749)
cgardens Nov 1, 2022
d366665
Remove the bulk actions from ConfigPersistence (#18800)
cgardens Nov 1, 2022
42d6497
hide ConfigPersistence inside ConfigRepository to discourage use (#18…
cgardens Nov 1, 2022
ae7c658
ci: add job and run id to test reports (#18832)
Nov 2, 2022
a9378c4
Bump Airbyte version from 0.40.17 to 0.40.18 (#18827)
octavia-squidington-iii Nov 2, 2022
9954acb
πŸͺŸπŸ”§ Remove styled components (round 1) (#18766)
josephkmh Nov 2, 2022
ffa42fa
fixed acceptance tests (#18699)
darynaishchenko Nov 2, 2022
23804cc
πŸͺŸπŸ”§ Reactor Breadcrumbs component to use anchors (#18764)
josephkmh Nov 2, 2022
cc31042
increase test timeout for some webapp tests to prevent flakes (#18807)
mfsiega-airbyte Nov 2, 2022
6e7ac19
Remove "Filters and Segments" from Google Analytics v4 (#18508)
tybernstein Nov 2, 2022
7daaca7
Add notes about EU OAUth (#18835)
YowanR Nov 2, 2022
c648057
πŸͺŸπŸ› Fix: visual regression in ConnectorIcon (#18849)
josephkmh Nov 2, 2022
5a27df9
Add links to demo page (#18828)
timroes Nov 2, 2022
165c155
mysql-source:fix tinyint unsigned handling (#18619)
subodh1810 Nov 2, 2022
f16f643
:window: :tada: Allow environment specific sections in docs (#18829)
timroes Nov 2, 2022
7de1353
ci: replace GITHUB_OUTPUT with GITHUB_ENV on multiline variables (#18…
cuyk Nov 2, 2022
b98bf5a
Add connection ID to span (#18852)
jdpgrailsdev Nov 2, 2022
d3983b1
edited connector docs (#18855)
Amruta-Ranade Nov 2, 2022
6e3fd80
:window: :wrench: Upgrade husky to 8.0.1 (#18719)
timroes Nov 2, 2022
d830b27
ci: replace GITHUB_OUTPUT with GITHUB_ENV for multiline variables (#1…
cuyk Nov 2, 2022
0153cfa
Avoid NPE when adding connection ID to trace (#18856)
jdpgrailsdev Nov 2, 2022
fd07e43
Filter exit errors by operation name (#18850)
jdpgrailsdev Nov 2, 2022
20af2dd
add label
drewrasm Nov 2, 2022
17a27ed
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 2, 2022
9c5ff57
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 2, 2022
3952b1a
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 3, 2022
ccd37b3
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 3, 2022
2673001
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 4, 2022
7ba4586
auto-bump connector version
octavia-squidington-iii Nov 7, 2022
897cbda
Merge branch 'master' into ar/feat_pinterest_filters
drewrasm Nov 7, 2022
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 @@ -952,7 +952,7 @@
- name: Pinterest
sourceDefinitionId: 5cb7e5fe-38c2-11ec-8d3d-0242ac130003
dockerRepository: airbyte/source-pinterest
dockerImageTag: 0.1.8
dockerImageTag: 0.1.9
documentationUrl: https://docs.airbyte.com/integrations/sources/pinterest
icon: pinterest.svg
sourceType: api
Expand Down
16 changes: 15 additions & 1 deletion airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9346,7 +9346,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-pinterest:0.1.8"
- dockerImage: "airbyte/source-pinterest:0.1.9"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/pinterest"
connectionSpecification:
Expand All @@ -9364,6 +9364,20 @@
\ it would be defaulted to latest allowed date by api (914 days from today)."
examples:
- "2022-07-28"
status:
title: "Status"
description: "Entity statuses based off of campaigns, ad_groups, and ads.\
\ If you do not have a status set, it will be ignored completely."
type:
- "array"
- "null"
items:
type: "string"
enum:
- "ACTIVE"
- "PAUSED"
- "ARCHIVED"
uniqueItems: true
credentials:
title: "Authorization Method"
type: "object"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ COPY source_pinterest ./source_pinterest
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.8
LABEL io.airbyte.version=0.1.9
LABEL io.airbyte.name=airbyte/source-pinterest
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"format": "date"
},
"AD_ACCOUNT_ID": {
"type": ["null", "string"]
"type": ["string"]
},
"AD_ID": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"format": "date"
},
"AD_ACCOUNT_ID": {
"type": ["integer"]
"type": ["string"]
},
"AD_ID": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"format": "date"
},
"AD_ACCOUNT_ID": {
"type": ["null", "integer"]
"type": ["string"]
},
"AD_ID": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,13 @@ def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:


class Campaigns(ServerSideFilterStream):
def __init__(self, parent: HttpStream, with_data_slices: bool = True, status_filter: str = "", **kwargs):
drewrasm marked this conversation as resolved.
Show resolved Hide resolved
super().__init__(parent, with_data_slices, **kwargs)
self.status_filter = status_filter

def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
return f"ad_accounts/{stream_slice['parent']['id']}/campaigns"
params = f"?entity_statuses={self.status_filter}" if self.status_filter else ""
return f"ad_accounts/{stream_slice['parent']['id']}/campaigns{params}"


class CampaignAnalytics(PinterestAnalyticsStream):
Expand All @@ -269,8 +274,13 @@ def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:


class AdGroups(ServerSideFilterStream):
def __init__(self, parent: HttpStream, with_data_slices: bool = True, status_filter: str = "", **kwargs):
super().__init__(parent, with_data_slices, **kwargs)
self.status_filter = status_filter

def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
return f"ad_accounts/{stream_slice['parent']['id']}/ad_groups"
params = f"?entity_statuses={self.status_filter}" if self.status_filter else ""
return f"ad_accounts/{stream_slice['parent']['id']}/ad_groups{params}"


class AdGroupAnalytics(PinterestAnalyticsStream):
Expand All @@ -281,8 +291,13 @@ def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:


class Ads(ServerSideFilterStream):
def __init__(self, parent: HttpStream, with_data_slices: bool = True, status_filter: str = "", **kwargs):
super().__init__(parent, with_data_slices, **kwargs)
self.status_filter = status_filter

def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
return f"ad_accounts/{stream_slice['parent']['id']}/ads"
params = f"?entity_statuses={self.status_filter}" if self.status_filter else ""
return f"ad_accounts/{stream_slice['parent']['id']}/ads{params}"


class AdAnalytics(PinterestAnalyticsStream):
Expand Down Expand Up @@ -338,18 +353,19 @@ def check_connection(self, logger, config) -> Tuple[bool, any]:
def streams(self, config: Mapping[str, Any]) -> List[Stream]:
config = self._validate_and_transform(config)
config["authenticator"] = self.get_authenticator(config)
status = ",".join(config.get("status")) if config.get("status") else None
return [
AdAccountAnalytics(AdAccounts(config), config=config),
AdAccounts(config),
AdAnalytics(Ads(AdAccounts(config), with_data_slices=False, config=config), config=config),
AdGroupAnalytics(AdGroups(AdAccounts(config), with_data_slices=False, config=config), config=config),
AdGroups(AdAccounts(config), config=config),
Ads(AdAccounts(config), config=config),
AdGroups(AdAccounts(config), status_filter=status, config=config),
Ads(AdAccounts(config), status_filter=status, config=config),
BoardPins(Boards(config), config=config),
BoardSectionPins(BoardSections(Boards(config), config=config), config=config),
BoardSections(Boards(config), config=config),
Boards(config),
CampaignAnalytics(Campaigns(AdAccounts(config), with_data_slices=False, config=config), config=config),
Campaigns(AdAccounts(config), config=config),
Campaigns(AdAccounts(config), status_filter=status, config=config),
UserAccountAnalytics(None, config=config),
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
"description": "A date in the format YYYY-MM-DD. If you have not set a date, it would be defaulted to latest allowed date by api (914 days from today).",
"examples": ["2022-07-28"]
},
"status": {
"title": "Status",
"description": "Entity statuses based off of campaigns, ad_groups, and ads. If you do not have a status set, it will be ignored completely.",
"type": ["array", "null"],
"items": {
"type": "string",
"enum": ["ACTIVE", "PAUSED", "ARCHIVED"]
},
"uniqueItems": true
},
"credentials": {
"title": "Authorization Method",
"type": "object",
Expand Down Expand Up @@ -112,4 +122,4 @@
}
}
}
}
}
1 change: 1 addition & 0 deletions docs/integrations/sources/pinterest.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The connector is restricted by the Pinterest [requests limitation](https://devel

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------------------ |
| 0.1.9 | 2022-09-06 | [15074](https://github.com/airbytehq/airbyte/pull/15074) | Added filter based on statuses |
| 0.1.8 | 2022-10-21 | [18285](https://github.com/airbytehq/airbyte/pull/18285) | Fix type of `start_date` |
| 0.1.7 | 2022-09-29 | [17387](https://github.com/airbytehq/airbyte/pull/17387) | Set `start_date` dynamically based on API restrictions. |
| 0.1.6 | 2022-09-28 | [17304](https://github.com/airbytehq/airbyte/pull/17304) | Use CDK 0.1.89 |
Expand Down