Skip to content

Commit

Permalink
stage_name is not relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
steinitzu committed Jan 30, 2024
1 parent 3076700 commit 0f32964
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions dlt/destinations/impl/databricks/databricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def __init__(
table_name: str,
load_id: str,
client: DatabricksSqlClient,
stage_name: Optional[str] = None,
staging_credentials: Optional[CredentialsConfiguration] = None,
) -> None:
file_name = FileStorage.get_file_name_from_file_path(file_path)
Expand All @@ -129,11 +128,8 @@ def __init__(
if bucket_path:
bucket_url = urlparse(bucket_path)
bucket_scheme = bucket_url.scheme
# referencing an external s3/azure stage does not require explicit credentials
if bucket_scheme in ["s3", "az", "abfs", "gc", "gcs"] and stage_name:
from_clause = f"FROM ('{bucket_path}')"
# referencing an staged files via a bucket URL requires explicit AWS credentials
elif (
if (
bucket_scheme == "s3"
and staging_credentials
and isinstance(staging_credentials, AwsCredentialsWithoutDefaults)
Expand Down Expand Up @@ -228,7 +224,6 @@ def start_file_load(self, table: TTableSchema, file_path: str, load_id: str) ->
table["name"],
load_id,
self.sql_client,
stage_name=self.config.stage_name,
staging_credentials=(
self.config.staging_config.credentials if self.config.staging_config else None
),
Expand Down

0 comments on commit 0f32964

Please sign in to comment.