Skip to content

Commit 0422492

Browse files
committed
dev
1 parent acfc4a9 commit 0422492

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/cubejs-prestodb-driver/src/PrestoDriver.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export type PrestoDriverExportBucket = {
3535
accessKeyId?: string,
3636
secretAccessKey?: string,
3737
exportBucketRegion?: string,
38+
exportBucketS3AdvancedFS?: boolean,
3839
exportBucketCsvEscapeSymbol?: string,
3940
};
4041

@@ -318,10 +319,11 @@ export class PrestoDriver extends BaseDriver implements DriverInterface {
318319

319320
const { schema, tableName } = this.splitTableFullName(params.tableFullName);
320321
const tableWithCatalogAndSchema = `${this.config.catalog}.${schema}.${tableName}`;
321-
let protocol = bucketType === 'gcs' ? 'gs' : bucketType;
322-
if (bucketType === 's3') {
323-
protocol = 's3a';
324-
}
322+
323+
const protocol = {
324+
gcs: 'gc',
325+
s3: this.config.exportBucketS3AdvancedFS ? 's3a' : 's3'
326+
}[bucketType || 'gcs'];
325327

326328
const externalLocation = `${protocol}://${exportBucket}/${schema}/${tableName}`;
327329
const withParams = `( external_location = '${externalLocation}', format = 'CSV')`;

0 commit comments

Comments
 (0)