diff --git a/airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py b/airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py index b33fb8b76afa4..8c3b96105d4d8 100644 --- a/airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py +++ b/airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py @@ -30,7 +30,6 @@ from typing import Any, Dict, Mapping import pkg_resources - from airbyte_cdk.logger import AirbyteLogger from airbyte_cdk.models import ConnectorSpecification from jsonschema import RefResolver, validate diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json index 1af6e6190b21d..482542e22a73d 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json +++ b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json @@ -52,30 +52,18 @@ "type": "integer" }, "children": { - "type": [ - "null", - "array" - ], + "type": ["null", "array"], "items": { "type": "object", "properties": { "ab_id": { - "type": [ - "null", - "integer" - ] + "type": ["null", "integer"] }, "owner": { - "type": [ - "null", - "object" - ], + "type": ["null", "object"], "properties": { "owner_id": { - "type": [ - "null", - "integer" - ] + "type": ["null", "integer"] } } } @@ -380,4 +368,4 @@ "primary_key": [["id"]] } ] -} \ No newline at end of file +} diff --git a/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py b/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py index b6630ce777c58..b915377ef9494 100644 --- a/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py +++ b/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py @@ -335,28 +335,25 @@ def generate_json_parsing_model(self, from_table: str, column_names: Dict[str, T fields=self.extract_json_columns(column_names), from_table=jinja_call(from_table), unnesting_after_query=self.unnesting_after_query(), - sql_table_comment=self.sql_table_comment() + sql_table_comment=self.sql_table_comment(), ) return sql def extract_json_columns(self, column_names: Dict[str, Tuple[str, str]]) -> List[str]: return [ - StreamProcessor.extract_json_column( - field, self.json_column_name, self.properties[field], column_names[field][0], 'table_alias' - ) + StreamProcessor.extract_json_column(field, self.json_column_name, self.properties[field], column_names[field][0], "table_alias") for field in column_names ] @staticmethod - def extract_json_column( - property_name: str, json_column_name: str, definition: Dict, column_name: str, table_alias: str) -> str: + def extract_json_column(property_name: str, json_column_name: str, definition: Dict, column_name: str, table_alias: str) -> str: json_path = [property_name] # In some cases, some destination aren't able to parse the JSON blob using the original property name # we make their life easier by using a pre-populated and sanitized column name instead... normalized_json_path = [transform_json_naming(property_name)] table_alias = f"{table_alias}" if "unnested_column_value" in json_column_name: - table_alias = '' + table_alias = "" json_extract = jinja_call(f"json_extract('{table_alias}', {json_column_name}, {json_path})") if "type" in definition: if is_array(definition["type"]): @@ -593,7 +590,7 @@ def generate_final_model(self, from_table: str, column_names: Dict[str, Tuple[st fields=self.list_fields(column_names), hash_id=self.hash_id(), from_table=jinja_call(from_table), - sql_table_comment=self.sql_table_comment(include_from_table=True) + sql_table_comment=self.sql_table_comment(include_from_table=True), ) return sql diff --git a/airbyte-integrations/connectors/source-github/source_github/source.py b/airbyte-integrations/connectors/source-github/source_github/source.py index 5beb9908a52b8..eb4c993b5f1fb 100644 --- a/airbyte-integrations/connectors/source-github/source_github/source.py +++ b/airbyte-integrations/connectors/source-github/source_github/source.py @@ -52,7 +52,6 @@ Teams, ) - TOKEN_SEPARATOR = ","