Skip to content

Commit

Permalink
add token field to databricks access configs
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiseck3 committed Dec 18, 2024
1 parent 7d8fa92 commit 8fceeb4
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.3.11-dev0

### Enhancements

* **Support Databricks personal access token**

## 0.3.10

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion unstructured_ingest/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.10" # pragma: no cover
__version__ = "0.3.11-dev0" # pragma: no cover
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
)
from unstructured_ingest.utils.dep_check import requires_dependencies
from unstructured_ingest.v2.interfaces import (
AccessConfig,
ConnectionConfig,
Downloader,
DownloaderConfig,
Expand Down Expand Up @@ -52,6 +53,10 @@ def path(self) -> str:
return path


class DatabricksVolumesAccessConfig(AccessConfig):
token: Optional[str] = Field(default=None, description="Databricks Personal Access Token")


class DatabricksVolumesConnectionConfig(ConnectionConfig, ABC):
host: Optional[str] = Field(
default=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

from pydantic import Field, Secret

from unstructured_ingest.v2.interfaces import AccessConfig
from unstructured_ingest.v2.processes.connector_registry import (
DestinationRegistryEntry,
SourceRegistryEntry,
)
from unstructured_ingest.v2.processes.connectors.databricks.volumes import (
DatabricksVolumesAccessConfig,
DatabricksVolumesConnectionConfig,
DatabricksVolumesDownloader,
DatabricksVolumesDownloaderConfig,
Expand All @@ -21,7 +21,7 @@
CONNECTOR_TYPE = "databricks_volumes_aws"


class DatabricksAWSVolumesAccessConfig(AccessConfig):
class DatabricksAWSVolumesAccessConfig(DatabricksVolumesAccessConfig):
account_id: Optional[str] = Field(
default=None,
description="The Databricks account ID for the Databricks " "accounts endpoint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

from pydantic import Field, Secret

from unstructured_ingest.v2.interfaces import AccessConfig
from unstructured_ingest.v2.processes.connector_registry import (
DestinationRegistryEntry,
SourceRegistryEntry,
)
from unstructured_ingest.v2.processes.connectors.databricks.volumes import (
DatabricksVolumesAccessConfig,
DatabricksVolumesConnectionConfig,
DatabricksVolumesDownloader,
DatabricksVolumesDownloaderConfig,
Expand All @@ -21,7 +21,7 @@
CONNECTOR_TYPE = "databricks_volumes_azure"


class DatabricksAzureVolumesAccessConfig(AccessConfig):
class DatabricksAzureVolumesAccessConfig(DatabricksVolumesAccessConfig):
account_id: Optional[str] = Field(
default=None,
description="The Databricks account ID for the Databricks " "accounts endpoint.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

from pydantic import Field, Secret

from unstructured_ingest.v2.interfaces import AccessConfig
from unstructured_ingest.v2.processes.connector_registry import (
DestinationRegistryEntry,
SourceRegistryEntry,
)
from unstructured_ingest.v2.processes.connectors.databricks.volumes import (
DatabricksVolumesAccessConfig,
DatabricksVolumesConnectionConfig,
DatabricksVolumesDownloader,
DatabricksVolumesDownloaderConfig,
Expand All @@ -21,7 +21,7 @@
CONNECTOR_TYPE = "databricks_volumes_gcp"


class DatabricksGoogleVolumesAccessConfig(AccessConfig):
class DatabricksGoogleVolumesAccessConfig(DatabricksVolumesAccessConfig):
account_id: Optional[str] = Field(
default=None,
description="The Databricks account ID for the Databricks " "accounts endpoint.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

from pydantic import Field, Secret

from unstructured_ingest.v2.interfaces import AccessConfig
from unstructured_ingest.v2.processes.connector_registry import (
DestinationRegistryEntry,
SourceRegistryEntry,
)
from unstructured_ingest.v2.processes.connectors.databricks.volumes import (
DatabricksVolumesAccessConfig,
DatabricksVolumesConnectionConfig,
DatabricksVolumesDownloader,
DatabricksVolumesDownloaderConfig,
Expand All @@ -21,7 +21,7 @@
CONNECTOR_TYPE = "databricks_volumes"


class DatabricksNativeVolumesAccessConfig(AccessConfig):
class DatabricksNativeVolumesAccessConfig(DatabricksVolumesAccessConfig):
client_id: Optional[str] = Field(default=None, description="Client ID of the OAuth app.")
client_secret: Optional[str] = Field(
default=None, description="Client Secret of the OAuth app."
Expand Down

0 comments on commit 8fceeb4

Please sign in to comment.