Skip to content

Commit

Permalink
publish PR 4550 (#5219)
Browse files Browse the repository at this point in the history
Co-authored-by: Rodrigo Parra <[email protected]>
  • Loading branch information
sherifnada and rparrapy authored Aug 5, 2021
1 parent de0d6fc commit 6b07d30
Show file tree
Hide file tree
Showing 13 changed files with 223 additions and 185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import io.airbyte.integrations.base.JavaBaseConstants;
import io.airbyte.integrations.destination.ExtendedNameTransformer;
import io.airbyte.integrations.standardtest.destination.DestinationAcceptanceTest;

import java.nio.file.Path;
import java.sql.SQLException;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"streams": [
{
"name": "DatasetItems",
"supported_sync_modes": ["full_refresh"],
"destination_sync_mode": "overwrite",
"json_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object"
}
}
]
}
"streams": [
{
"name": "DatasetItems",
"supported_sync_modes": ["full_refresh"],
"destination_sync_mode": "overwrite",
"json_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"datasetId": "non_existent_dataset_id",
"clean": false
"datasetId": "non_existent_dataset_id",
"clean": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"required": ["datasetId"],
"additionalProperties": false,
"properties": {
"datasetId": {
"type": "string",
"description": "ID of the dataset you would like to load to Airbyte."
},
"clean": {
"type": "boolean",
"description": "If set to true, only clean items will be downloaded from the dataset. See description of what clean means in <a href=\"https://docs.apify.com/api/v2#/reference/datasets/item-collection/get-items\">Apify API docs</a>. If not sure, set clean to false."
}
"datasetId": {
"type": "string",
"description": "ID of the dataset you would like to load to Airbyte."
},
"clean": {
"type": "boolean",
"description": "If set to true, only clean items will be downloaded from the dataset. See description of what clean means in <a href=\"https://docs.apify.com/api/v2#/reference/datasets/item-collection/get-items\">Apify API docs</a>. If not sure, set clean to false."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import time
from abc import ABC, abstractmethod
from datetime import datetime, timedelta
from functools import partial, lru_cache
from functools import lru_cache, partial
from http import HTTPStatus
from typing import Any, Callable, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Union

Expand Down Expand Up @@ -288,16 +288,7 @@ def _cast_value(declared_field_types: List, field_name: str, field_value):

def _cast_record_fields_if_needed(self, record: Mapping, properties: Mapping[str, Any] = None) -> Mapping:

if self.entity not in {
"contact",
"engagement",
"product",
"quote",
"ticket",
"company",
"deal",
"line_item"
}:
if self.entity not in {"contact", "engagement", "product", "quote", "ticket", "company", "deal", "line_item"}:
return record

if not record.get("properties"):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# MIT License
#
# Copyright (c) 2021 Airbyte
# Copyright (c) 2020 Airbyte
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# MIT License
#
# Copyright (c) 2020 Airbyte
Expand All @@ -19,6 +20,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#


import pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# MIT License
#
# Copyright (c) 2020 Airbyte
Expand All @@ -19,6 +20,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

import sys

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# MIT License
#
# Copyright (c) 2020 Airbyte
Expand All @@ -19,6 +20,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

from setuptools import find_packages, setup

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# MIT License
#
# Copyright (c) 2020 Airbyte
Expand All @@ -19,6 +20,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#


import json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# MIT License
#
# Copyright (c) 2020 Airbyte
Expand All @@ -19,6 +20,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#


def test_example_method():
Expand Down
Loading

0 comments on commit 6b07d30

Please sign in to comment.