diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/29b409d9-30a5-4cc8-ad50-886eb846fea3.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/29b409d9-30a5-4cc8-ad50-886eb846fea3.json index 91b0c6dfdbfe..c447934314fe 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/29b409d9-30a5-4cc8-ad50-886eb846fea3.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/29b409d9-30a5-4cc8-ad50-886eb846fea3.json @@ -1,6 +1,6 @@ { "sourceDefinitionId": "29b409d9-30a5-4cc8-ad50-886eb846fea3", - "name": "Qucikbooks", + "name": "Quickbooks", "dockerRepository": "airbyte/source-quickbooks-singer", "dockerImageTag": "0.1.0", "documentationUrl": "https://hub.docker.com/r/airbyte/source-quickbooks-singer" diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json index b994945981aa..8d72253010f6 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json @@ -2,6 +2,6 @@ "sourceDefinitionId": "71607ba1-c0ac-4799-8049-7f4b90dd50f7", "name": "Google Sheets", "dockerRepository": "airbyte/source-google-sheets", - "dockerImageTag": "0.2.1", + "dockerImageTag": "0.2.2", "documentationUrl": "https://hub.docker.com/repository/docker/airbyte/source-google-sheets" } diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/b39a7370-74c3-45a6-ac3a-380d48520a83.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/b39a7370-74c3-45a6-ac3a-380d48520a83.json index b1d770a29d2b..f19192f4c57a 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/b39a7370-74c3-45a6-ac3a-380d48520a83.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/b39a7370-74c3-45a6-ac3a-380d48520a83.json @@ -1,6 +1,6 @@ { "sourceDefinitionId": "b39a7370-74c3-45a6-ac3a-380d48520a83", - "name": "Oracle", + "name": "Oracle DB", "dockerRepository": "airbyte/source-oracle", "dockerImageTag": "0.2.0", "documentationUrl": "https://hub.docker.com/r/airbyte/source-oracle" diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index e062d9090272..9901f337f200 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -46,7 +46,7 @@ - sourceDefinitionId: 71607ba1-c0ac-4799-8049-7f4b90dd50f7 name: Google Sheets dockerRepository: airbyte/source-google-sheets - dockerImageTag: 0.2.1 + dockerImageTag: 0.2.2 documentationUrl: https://hub.docker.com/repository/docker/airbyte/source-google-sheets - sourceDefinitionId: 435bb9a5-7887-4809-aa58-28c27df0d7ad name: MySQL @@ -210,7 +210,7 @@ # dockerImageTag: 0.1.1 # documentationUrl: https://hub.docker.com/r/airbyte/source-smartsheets - sourceDefinitionId: b39a7370-74c3-45a6-ac3a-380d48520a83 - name: Oracle + name: Oracle DB dockerRepository: airbyte/source-oracle dockerImageTag: 0.2.0 documentationUrl: https://hub.docker.com/r/airbyte/source-oracle @@ -220,7 +220,7 @@ dockerImageTag: 0.1.0 documentationUrl: https://hub.docker.com/r/airbyte/source-zendesk-talk - sourceDefinitionId: 29b409d9-30a5-4cc8-ad50-886eb846fea3 - name: Qucikbooks + name: Quickbooks dockerRepository: airbyte/source-quickbooks-singer dockerImageTag: 0.1.0 documentationUrl: https://hub.docker.com/r/airbyte/source-quickbooks-singer diff --git a/airbyte-integrations/connectors/source-google-sheets/Dockerfile b/airbyte-integrations/connectors/source-google-sheets/Dockerfile index d754622685e8..8c5c2feeea14 100644 --- a/airbyte-integrations/connectors/source-google-sheets/Dockerfile +++ b/airbyte-integrations/connectors/source-google-sheets/Dockerfile @@ -11,5 +11,5 @@ COPY $CODE_PATH ./$CODE_PATH COPY setup.py ./ RUN pip install . -LABEL io.airbyte.version=0.2.1 +LABEL io.airbyte.version=0.2.2 LABEL io.airbyte.name=airbyte/source-google-sheets diff --git a/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/google_sheets_source.py b/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/google_sheets_source.py index a6d97a63cf47..9c305d851624 100644 --- a/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/google_sheets_source.py +++ b/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/google_sheets_source.py @@ -76,16 +76,19 @@ def check(self, logger: AirbyteLogger, config: json) -> AirbyteConnectionStatus: except Exception as err: logger.error(str(err)) return AirbyteConnectionStatus( - status=Status.FAILED, - message=f"Unable to read the schema of sheet {sheet_name}. Error: {str(err)}" + status=Status.FAILED, message=f"Unable to read the schema of sheet {sheet_name}. Error: {str(err)}" ) if duplicate_headers_in_sheet: - duplicate_headers_error_message = ", ".join([f"[sheet:{sheet_name}, headers:{duplicate_sheet_headers}]" - for sheet_name,duplicate_sheet_headers in duplicate_headers_in_sheet.items()]) + duplicate_headers_error_message = ", ".join( + [ + f"[sheet:{sheet_name}, headers:{duplicate_sheet_headers}]" + for sheet_name, duplicate_sheet_headers in duplicate_headers_in_sheet.items() + ] + ) return AirbyteConnectionStatus( status=Status.FAILED, message="The following duplicate headers were found in the following sheets. Please fix them to continue: " - + duplicate_headers_error_message + + duplicate_headers_error_message, ) return AirbyteConnectionStatus(status=Status.SUCCEEDED) diff --git a/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/helpers.py b/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/helpers.py index dbfd7c449bd7..0c36ce2254a7 100644 --- a/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/helpers.py +++ b/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/helpers.py @@ -26,8 +26,8 @@ from datetime import datetime from typing import Dict, FrozenSet, Iterable, List -from base_python import AirbyteLogger from airbyte_protocol import AirbyteRecordMessage, AirbyteStream, ConfiguredAirbyteCatalog +from base_python import AirbyteLogger from google.oauth2 import service_account from googleapiclient import discovery diff --git a/airbyte-integrations/connectors/source-google-sheets/main_dev.py b/airbyte-integrations/connectors/source-google-sheets/main_dev.py index 91b1679806f1..0f88628720a4 100644 --- a/airbyte-integrations/connectors/source-google-sheets/main_dev.py +++ b/airbyte-integrations/connectors/source-google-sheets/main_dev.py @@ -25,7 +25,6 @@ import sys from base_python.entrypoint import launch - from google_sheets_source import GoogleSheetsSource if __name__ == "__main__": diff --git a/airbyte-integrations/connectors/source-google-sheets/sample_files/configured_catalog.json b/airbyte-integrations/connectors/source-google-sheets/sample_files/configured_catalog.json index e7d36b0d37d3..4810fc28879f 100644 --- a/airbyte-integrations/connectors/source-google-sheets/sample_files/configured_catalog.json +++ b/airbyte-integrations/connectors/source-google-sheets/sample_files/configured_catalog.json @@ -1,20 +1,20 @@ { "streams": [ { - "stream" : { + "stream": { "name": "Sheet1", "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "ID": { - "type": "string" - }, - "Name": { - "type": "string" + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "ID": { + "type": "string" + }, + "Name": { + "type": "string" + } } - } - }, + }, "supported_sync_modes": ["full_refresh"], "source_defined_cursor": false }, @@ -22,4 +22,4 @@ "destination_sync_mode": "overwrite" } ] -} \ No newline at end of file +} diff --git a/airbyte-integrations/connectors/source-google-sheets/sample_files/sample_config.json b/airbyte-integrations/connectors/source-google-sheets/sample_files/sample_config.json index 0587ca9f7fca..3313d848ee4c 100644 --- a/airbyte-integrations/connectors/source-google-sheets/sample_files/sample_config.json +++ b/airbyte-integrations/connectors/source-google-sheets/sample_files/sample_config.json @@ -1,6 +1,4 @@ { - "spreadsheet_id" : "randomid", - "credentials_json" : "{\"type\": \"service_account\",\"project_id\": \"airbyte-310409\",\"private_key_id\": \"xyz\",\"private_key\": \"-----BEGIN PRIVATE KEY-----\\n ... -----END PRIVATE KEY-----\\n\",\"client_email\": \"airbyte@airbyte-123456.iam.gserviceaccount.com\",\"client_id\": \"121512124\",\"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\"token_uri\": \"https://oauth2.googleapis.com/token\",\"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/airbyte%40airbyte-123456.iam.gserviceaccount.com\"}" + "spreadsheet_id": "randomid", + "credentials_json": "{\"type\": \"service_account\",\"project_id\": \"airbyte-310409\",\"private_key_id\": \"xyz\",\"private_key\": \"-----BEGIN PRIVATE KEY-----\\n ... -----END PRIVATE KEY-----\\n\",\"client_email\": \"airbyte@airbyte-123456.iam.gserviceaccount.com\",\"client_id\": \"121512124\",\"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\"token_uri\": \"https://oauth2.googleapis.com/token\",\"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/airbyte%40airbyte-123456.iam.gserviceaccount.com\"}" } - - diff --git a/airbyte-integrations/connectors/source-google-sheets/unit_tests/test_helpers.py b/airbyte-integrations/connectors/source-google-sheets/unit_tests/test_helpers.py index e0fe98fc0ce6..4971c0495c15 100644 --- a/airbyte-integrations/connectors/source-google-sheets/unit_tests/test_helpers.py +++ b/airbyte-integrations/connectors/source-google-sheets/unit_tests/test_helpers.py @@ -25,15 +25,16 @@ import unittest from unittest.mock import Mock, patch -from base_python import AirbyteLogger from airbyte_protocol import AirbyteRecordMessage, AirbyteStream, ConfiguredAirbyteCatalog, ConfiguredAirbyteStream, SyncMode from airbyte_protocol.models.airbyte_protocol import DestinationSyncMode +from base_python import AirbyteLogger from google_sheets_source.client import GoogleSheetsClient from google_sheets_source.helpers import Helpers from google_sheets_source.models import CellData, GridData, RowData, Sheet, SheetProperties, Spreadsheet logger = AirbyteLogger() + class TestHelpers(unittest.TestCase): def test_headers_to_airbyte_stream(self): sheet_name = "sheet1"