Skip to content

Commit

Permalink
🎉 Source tiktok marketing: fixed specs, updated docs (#12380)
Browse files Browse the repository at this point in the history
* specs: changed order for input params, marked required params

* updated docs

* updated specs test

* updated connector version

* auto-bump connector version

* updated seed files

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
2 people authored and suhomud committed May 23, 2022
1 parent 76f6fc0 commit 6cf727a
Show file tree
Hide file tree
Showing 6 changed files with 554 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@
- name: TikTok Marketing
sourceDefinitionId: 4bfac00d-ce15-44ff-95b9-9e3c3e8fbd35
dockerRepository: airbyte/source-tiktok-marketing
dockerImageTag: 0.1.6
dockerImageTag: 0.1.7
documentationUrl: https://docs.airbyte.io/integrations/sources/tiktok-marketing
icon: tiktok.svg
sourceType: api
Expand Down
54 changes: 24 additions & 30 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8636,39 +8636,18 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-tiktok-marketing:0.1.6"
- dockerImage: "airbyte/source-tiktok-marketing:0.1.7"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/tiktok-marketing"
changelogUrl: "https://docs.airbyte.io/integrations/sources/tiktok-marketing"
connectionSpecification:
title: "TikTok Marketing Source Spec"
type: "object"
properties:
start_date:
title: "Start Date"
description: "The Start Date in format: YYYY-MM-DD. Any data before this\
\ date will not be replicated. If this parameter is not set, all data\
\ will be replicated."
default: "2016-09-01"
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
order: 0
type: "string"
report_granularity:
title: "Report Granularity"
description: "Which time granularity should be grouped by; for LIFETIME\
\ there will be no grouping. This option is used for reports' streams\
\ only."
default: "DAY"
enum:
- "LIFETIME"
- "DAY"
- "HOUR"
order: 1
type: "string"
credentials:
title: "Authorization Method"
title: "Authentication *"
default: {}
order: 3
order: 0
type: "object"
oneOf:
- title: "OAuth2.0"
Expand All @@ -8678,8 +8657,6 @@
title: "Auth Type"
const: "oauth2.0"
order: 0
enum:
- "oauth2.0"
type: "string"
app_id:
title: "App ID"
Expand Down Expand Up @@ -8707,8 +8684,6 @@
title: "Auth Type"
const: "prod_access_token"
order: 0
enum:
- "prod_access_token"
type: "string"
app_id:
title: "App ID"
Expand All @@ -8735,8 +8710,6 @@
title: "Auth Type"
const: "sandbox_access_token"
order: 0
enum:
- "sandbox_access_token"
type: "string"
advertiser_id:
title: "Advertiser ID"
Expand All @@ -8751,6 +8724,27 @@
required:
- "advertiser_id"
- "access_token"
start_date:
title: "Start Date *"
description: "The Start Date in format: YYYY-MM-DD. Any data before this\
\ date will not be replicated. If this parameter is not set, all data\
\ will be replicated."
default: "2016-09-01"
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
order: 1
type: "string"
report_granularity:
title: "Report Granularity *"
description: "Which time granularity should be grouped by; for LIFETIME\
\ there will be no grouping. This option is used for reports' streams\
\ only."
default: "DAY"
enum:
- "LIFETIME"
- "DAY"
- "HOUR"
order: 2
type: "string"
supportsIncremental: true
supportsNormalization: false
supportsDBT: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ COPY source_tiktok_marketing ./source_tiktok_marketing
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.6
LABEL io.airbyte.version=0.1.7
LABEL io.airbyte.name=airbyte/source-tiktok-marketing
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,10 @@
"title": "TikTok Marketing Source Spec",
"type": "object",
"properties": {
"start_date": {
"title": "Start Date",
"description": "The Start Date in format: YYYY-MM-DD. Any data before this date will not be replicated. If this parameter is not set, all data will be replicated.",
"default": "2016-09-01",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"order": 0,
"type": "string"
},
"report_granularity": {
"title": "Report Granularity",
"description": "Which time granularity should be grouped by; for LIFETIME there will be no grouping. This option is used for reports' streams only.",
"default": "DAY",
"enum": ["LIFETIME", "DAY", "HOUR"],
"order": 1,
"type": "string"
},
"credentials": {
"title": "Authorization Method",
"title": "Authentication *",
"default": {},
"order": 3,
"order": 0,
"type": "object",
"oneOf": [
{
Expand Down Expand Up @@ -113,6 +97,22 @@
"required": ["advertiser_id", "access_token"]
}
]
},
"start_date": {
"title": "Start Date *",
"description": "The Start Date in format: YYYY-MM-DD. Any data before this date will not be replicated. If this parameter is not set, all data will be replicated.",
"default": "2016-09-01",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"order": 1,
"type": "string"
},
"report_granularity": {
"title": "Report Granularity *",
"description": "Which time granularity should be grouped by; for LIFETIME there will be no grouping. This option is used for reports' streams only.",
"default": "DAY",
"enum": ["LIFETIME", "DAY", "HOUR"],
"order": 2,
"type": "string"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,26 @@ class SourceTiktokMarketingSpec(BaseModel):
class Config:
title = "TikTok Marketing Source Spec"

credentials: Union[OauthCredSpec, ProductionEnvSpec, SandboxEnvSpec] = Field(
title="Authentication *", order=0, default={}, type="object"
)

start_date: str = Field(
title="Start Date",
title="Start Date *",
default=DEFAULT_START_DATE,
pattern="^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
description="The Start Date in format: YYYY-MM-DD. Any data before this date will not be replicated. "
"If this parameter is not set, all data will be replicated.",
order=0,
order=1,
)

report_granularity: str = Field(
title="Report Granularity",
title="Report Granularity *",
description="Which time granularity should be grouped by; for LIFETIME there will be no grouping. "
"This option is used for reports' streams only.",
default=ReportGranularity.default().value,
enum=[g.value for g in ReportGranularity],
order=1,
)

credentials: Union[OauthCredSpec, ProductionEnvSpec, SandboxEnvSpec] = Field(
title="Authorization Method", order=3, default={}, type="object"
order=2,
)

@classmethod
Expand Down
Loading

0 comments on commit 6cf727a

Please sign in to comment.