File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/cubejs-databricks-jdbc-driver/src Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -703,6 +703,13 @@ export class DatabricksDriver extends JDBCDriver {
703703704704 // The extractors in BaseDriver expect just clean bucket name
705705 const url = new URL ( this . config . exportBucket || '' ) ;
706+ const prefix = url . pathname . slice ( 1 ) ;
707+ let delimiter = '' ;
708+ if ( prefix && ! prefix . endsWith ( '/' ) ) {
709+ delimiter = '/' ;
710+ }
711+
712+ const objectSearchPrefix = `${ prefix } ${ delimiter } ${ tableName } ` ;
706713
707714 if ( this . config . bucketType === 'azure' ) {
708715 const {
@@ -716,7 +723,7 @@ export class DatabricksDriver extends JDBCDriver {
716723 // Databricks uses different bucket address form, so we need to transform it
717724 // to the one understandable by extractFilesFromAzure implementation
718725 `${ url . host } /${ url . username } ` ,
719- tableName ,
726+ objectSearchPrefix ,
720727 ) ;
721728 } else if ( this . config . bucketType === 's3' ) {
722729 return this . extractUnloadedFilesFromS3 (
@@ -728,7 +735,7 @@ export class DatabricksDriver extends JDBCDriver {
728735 region : this . config . awsRegion || '' ,
729736 } ,
730737 url . host ,
731- tableName ,
738+ objectSearchPrefix ,
732739 ) ;
733740 } else {
734741 throw new Error ( `Unsupported export bucket type: ${
You can’t perform that action at this time.
0 commit comments