Skip to content

Commit

Permalink
Source GCS: Fix unstructured format (#34158)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Reuter committed Jan 12, 2024
1 parent e2146ea commit 94dc686
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
},
"primary_key": {
"title": "Primary Key",
"description": "The column or columns (for a composite key) that serves as the unique identifier of a record.",
"type": "string",
"airbyte_hidden": true
"description": "The column or columns (for a composite key) that serves as the unique identifier of a record. If empty, the primary key will default to the parser's default primary key.",
"airbyte_hidden": true,
"type": "string"
},
"days_to_sync_if_history_is_full": {
"title": "Days To Sync If History Is Full",
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-gcs/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data:
connectorSubtype: file
connectorType: source
definitionId: 2a8c41ae-8c23-4be0-a73f-2ab10ca1a820
dockerImageTag: 0.3.3
dockerImageTag: 0.3.4
dockerRepository: airbyte/source-gcs
documentationUrl: https://docs.airbyte.com/integrations/sources/gcs
githubIssueLabel: source-gcs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ def replace_enum_allOf_and_anyOf(schema):
objects_to_check["anyOf"] = objects_to_check.pop("allOf")

return super(Config, Config).replace_enum_allOf_and_anyOf(schema)

@staticmethod
def remove_discriminator(schema) -> None:
pass
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import itertools
import json
import logging
from contextlib import contextmanager
from datetime import datetime, timedelta
from io import IOBase
from typing import Iterable, List, Optional
Expand Down Expand Up @@ -94,7 +93,6 @@ def _handle_file_listing_error(self, exc: Exception, prefix: str, logger: loggin
prefix=prefix,
) from exc

@contextmanager
def open_file(self, file: RemoteFile, mode: FileReadMode, encoding: Optional[str], logger: logging.Logger) -> IOBase:
"""
Open and yield a remote file from GCS for reading.
Expand All @@ -105,7 +103,4 @@ def open_file(self, file: RemoteFile, mode: FileReadMode, encoding: Optional[str
except OSError as oe:
logger.warning(ERROR_MESSAGE_ACCESS.format(uri=file.uri, bucket=self.config.bucket))
logger.exception(oe)
try:
yield result
finally:
result.close()
return result
1 change: 1 addition & 0 deletions docs/integrations/sources/gcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Use the service account ID from above, grant read access to your target bucket.

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:----------------------------------------------------|
| 0.3.4 | 2024-01-11 | [34158](https://github.com/airbytehq/airbyte/pull/34158) | Fix issue in stream reader for document file type parser |
| 0.3.3 | 2023-12-06 | [33187](https://github.com/airbytehq/airbyte/pull/33187) | Bump CDK version to hide source-defined primary key |
| 0.3.2 | 2023-11-16 | [32608](https://github.com/airbytehq/airbyte/pull/32608) | Improve document file type parser |
| 0.3.1 | 2023-11-13 | [32357](https://github.com/airbytehq/airbyte/pull/32357) | Improve spec schema |
Expand Down

0 comments on commit 94dc686

Please sign in to comment.