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 Pardot : Add Tags & TagObjects Streams #48596

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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 @@ -119,6 +119,30 @@
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "tags",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_cursor": true,
"default_cursor_field": ["id"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "tag_objects",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_cursor": true,
"default_cursor_field": ["id"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
181 changes: 181 additions & 0 deletions airbyte-integrations/connectors/source-pardot/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,134 @@ definitions:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/opportunities"
tags:
type: DeclarativeStream
name: tags
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: tag/version/4/do/query
http_method: GET
request_parameters:
format: json
request_headers:
Pardot-Business-Unit-Id: "{{ config[\"pardot_business_unit_id\"] }}"
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- result
- tag
paginator:
type: DefaultPaginator
page_token_option:
type: RequestOption
inject_into: request_parameter
field_name: offset
page_size_option:
type: RequestOption
field_name: limit
inject_into: request_parameter
pagination_strategy:
type: OffsetIncrement
page_size: 50
inject_on_first_request: true
incremental_sync:
type: DatetimeBasedCursor
cursor_field: updated_at
cursor_datetime_formats:
- "%Y-%m-%d %H:%M:%S"
datetime_format: "%Y-%m-%d %H:%M:%S"
start_datetime:
type: MinMaxDatetime
datetime: >-
{{ format_datetime(config['start_date'] or (now() -
timedelta(days=365)), '%Y-%m-%dT%H:%M:%SZ') }}
datetime_format: "%Y-%m-%dT%H:%M:%SZ"
start_time_option:
type: RequestOption
field_name: updated_after
inject_into: request_parameter
end_time_option:
type: RequestOption
field_name: updated_before
inject_into: request_parameter
end_datetime:
type: MinMaxDatetime
datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}"
datetime_format: "%Y-%m-%dT%H:%M:%SZ"
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/tags"
tag_objects:
type: DeclarativeStream
name: tag_objects
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: tagObject/version/4/do/query
http_method: GET
request_parameters:
format: json
request_headers:
Pardot-Business-Unit-Id: "{{ config[\"pardot_business_unit_id\"] }}"
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- result
- tagObject
paginator:
type: DefaultPaginator
page_token_option:
type: RequestOption
inject_into: request_parameter
field_name: offset
page_size_option:
type: RequestOption
field_name: limit
inject_into: request_parameter
pagination_strategy:
type: OffsetIncrement
page_size: 50
inject_on_first_request: true
incremental_sync:
type: DatetimeBasedCursor
cursor_field: created_at
cursor_datetime_formats:
- "%Y-%m-%d %H:%M:%S"
datetime_format: "%Y-%m-%d %H:%M:%S"
start_datetime:
type: MinMaxDatetime
datetime: >-
{{ format_datetime(config['start_date'] or (now() -
timedelta(days=365)), '%Y-%m-%dT%H:%M:%SZ') }}
datetime_format: "%Y-%m-%dT%H:%M:%SZ"
start_time_option:
type: RequestOption
field_name: created_after
inject_into: request_parameter
end_time_option:
type: RequestOption
field_name: created_before
inject_into: request_parameter
end_datetime:
type: MinMaxDatetime
datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}"
datetime_format: "%Y-%m-%dT%H:%M:%SZ"
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/tag_objects"
base_requester:
type: HttpRequester
url_base: https://pi.pardot.com/api/
Expand All @@ -453,6 +581,8 @@ streams:
- $ref: "#/definitions/streams/visitors"
- $ref: "#/definitions/streams/visits"
# - $ref: "#/definitions/streams/opportunities" # Currently disabled because test account doesn't have any data
- $ref: "#/definitions/streams/tags"
- $ref: "#/definitions/streams/tag_objects"


spec:
Expand Down Expand Up @@ -525,6 +655,8 @@ metadata:
visitors: false
visits: false
opportunities: false
tags: false
tag_objects: false
yamlComponents:
global:
- authenticator
Expand All @@ -551,6 +683,10 @@ metadata:
streamHash: c526ae3538c2c4f9b434e803521c509c0e5271a2
opportunities:
streamHash: fe2484cadf31a482f5f5421ac4a70d14f03e8796
tags:
streamHash: null
tag_objects:
streamHash: null
assist: {}

schemas:
Expand Down Expand Up @@ -1224,3 +1360,48 @@ schemas:
type:
- "null"
- number
tags:
type: object
$schema: http://json-schema.org/draft-07/schema#
additionalProperties: true
properties:
id:
type:
- integer
name:
type:
- "null"
- string
created_at:
type:
- "null"
- string
format: date-time
updated_at:
type:
- "null"
- string
format: date-time
tag_objects:
type: object
$schema: http://json-schema.org/draft-07/schema#
additionalProperties: true
properties:
id:
type:
- integer
tag_id:
type:
- integer
type:
type:
- "null"
- string
object_id:
type:
- integer
created_at:
type:
- "null"
- string
format: date-time
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: ad15c7ba-72a7-440b-af15-b9a963dc1a8a
dockerImageTag: 0.2.0
dockerImageTag: 0.3.0
dockerRepository: airbyte/source-pardot
githubIssueLabel: source-pardot
icon: salesforcepardot.svg
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/pardot.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ The Pardot connector should not run into Pardot API limitations under normal usa

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :-------------------- |
| 0.3.0 | 2024-11-21 | [x](https://github.com/airbytehq/airbyte/pull/x) | Add tags and tag_objects stream |
| 0.2.0 | 2024-10-13 | [44528](https://github.com/airbytehq/airbyte/pull/44528) | Migrate to LowCode then Manifest-only |
| 0.1.22 | 2024-10-12 | [46778](https://github.com/airbytehq/airbyte/pull/46778) | Update dependencies |
| 0.1.21 | 2024-10-05 | [46441](https://github.com/airbytehq/airbyte/pull/46441) | Update dependencies |
Expand Down
Loading