Skip to content

Commit

Permalink
fix Databricks driver export bucket flows after refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
KSDaemon committed Sep 25, 2024
1 parent 1485b9d commit b49b764
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,16 @@ export class DatabricksDriver extends JDBCDriver {
private async getCsvFiles(
tableName: string,
): Promise<string[]> {
// this.config.exportBucket includes schema
// so it looks like: s3://real-bucket-name
// The extractors in BaseDriver expect just clean bucket name
const url = new URL(this.config.bucketType || '');

switch (this.config.bucketType) {
case 'azure':
return this.extractFilesFromAzure(
{ azureKey: this.config.azureKey || '' },
this.config.exportBucket || '',
url.host,
tableName,
);
case 's3':
Expand All @@ -685,7 +690,7 @@ export class DatabricksDriver extends JDBCDriver {
},
region: this.config.awsRegion || '',
},
this.config.exportBucket || '',
url.host,
tableName,
);
default:
Expand Down

0 comments on commit b49b764

Please sign in to comment.