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 Marketo: Fix timestamp value format issue #8298

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-marketo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ COPY source_marketo ./source_marketo
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.0
LABEL io.airbyte.version=0.1.1
LABEL io.airbyte.name=airbyte/source-marketo
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ tests:
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: []
timeout_seconds: 3600
expect_records:
path: "integration_tests/expected_records.txt"
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, config: Mapping[str, Any], stream_name: str = None, param: Ma
super().__init__(authenticator=config["authenticator"])
self.config = config
self.start_date = config["start_date"]
self.window_in_days = config["window_in_days"]
self.window_in_days = config.get("window_in_days", 30)
self._url_base = config["domain_url"]
self.stream_name = stream_name
self.param = param
Expand Down Expand Up @@ -435,7 +435,8 @@ def request_params(

def parse_response(self, response: requests.Response, stream_state: Mapping[str, Any], **kwargs) -> Iterable[Mapping]:
for record in super().parse_response(response, stream_state, **kwargs):
record["updatedAt"] = record["updatedAt"][:-5] # delete +00:00 part from the end of updatedAt
# delete +00:00 part from the end of createdAt and updatedAt
record["updatedAt"], record["createdAt"] = record["updatedAt"][:-5], record["createdAt"][:-5]
yield record


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,37 @@
"title": "Source Marketo Spec",
"type": "object",
"required": ["domain_url", "client_id", "client_secret", "start_date"],
"additionalProperties": false,
"additionalProperties": true,
"properties": {
"domain_url": {
"title": "Domain URL",
"type": "string",
"order": 3,
"description": "Your Marketo Base URL. See <a href=\"https://docs.airbyte.io/integrations/sources/marketo\"> the docs </a> for info on how to obtain this.",
"examples": ["https://000-AAA-000.mktorest.com"],
"airbyte_secret": true
},
"client_id": {
"title": "Client ID",
"type": "string",
"order": 0,
"description": "Your Marketo client_id. See <a href=\"https://docs.airbyte.io/integrations/sources/marketo\"> the docs </a> for info on how to obtain this.",
"airbyte_secret": true
},
"client_secret": {
"title": "Client Secret",
"type": "string",
"order": 1,
"description": "Your Marketo client secret. See <a href=\"https://docs.airbyte.io/integrations/sources/marketo\"> the docs </a> for info on how to obtain this.",
"airbyte_secret": true
},
"start_date": {
"title": "Start Date",
"type": "string",
"order": 2,
"description": "Data generated in Marketo after this date will be replicated. This date must be specified in the format YYYY-MM-DDT00:00:00Z.",
"examples": ["2020-09-25T00:00:00Z"],
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
},
"window_in_days": {
"type": "integer",
"description": "The amount of days for each data-chunk begining from start_date. (Min=1, as for a Day; Max=30, as for a Month).",
"examples": [1, 5, 10, 15, 30],
"default": 30
}
}
}
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/marketo.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ We're almost there! Armed with your Endpoint & Identity URLs and your Client ID

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| `0.1.1` | 2021-11-29 | [0000](https://github.com/airbytehq/airbyte/pull/0000) | Fix timestamp value format issue |
| `0.1.0` | 2021-09-06 | [5863](https://github.com/airbytehq/airbyte/pull/5863) | Release Marketo CDK Connector |