Skip to content

Commit 4020b36

Browse files
qiao-xKSDaemon
authored andcommitted
add correct search prefix and filter after extract
1 parent f62e1f3 commit 4020b36

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/cubejs-databricks-jdbc-driver/src/DatabricksDriver.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,11 @@ export class DatabricksDriver extends JDBCDriver {
749749
return this.extractFilesFromGCS(
750750
{ credentials: this.config.gcsCredentials },
751751
url.host,
752-
objectSearchPrefix,
753-
);
752+
objectSearchPrefix+".csv",
753+
).then(files => files.filter(file =>
754+
decodeURIComponent(new URL(file).pathname).endsWith('.csv') ||
755+
decodeURIComponent(new URL(file).pathname).endsWith('.csv.gz')
756+
));
754757
} else {
755758
throw new Error(`Unsupported export bucket type: ${
756759
this.config.bucketType

0 commit comments

Comments
 (0)