File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
packages/cubejs-redshift-driver/src Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515 QueryTablesResult ,
1616 StreamOptions ,
1717 StreamTableDataWithTypes ,
18+ TableColumn ,
1819 UnloadOptions
1920} from '@cubejs-backend/base-driver' ;
2021import crypto from 'crypto' ;
@@ -240,6 +241,14 @@ export class RedshiftDriver extends PostgresDriver<RedshiftDriverConfiguration>
240241 }
241242 }
242243
244+ public override async createTable ( quotedTableName : string , columns : TableColumn [ ] ) : Promise < void > {
245+ if ( quotedTableName . length > 127 ) {
246+ throw new Error ( 'Redshift can not work with table names longer than 127 symbols. ' +
247+ `Consider using the 'sqlAlias' attribute in your cube definition for ${ quotedTableName } .` ) ;
248+ }
249+ return super . createTable ( quotedTableName , columns ) ;
250+ }
251+
243252 /**
244253 * AWS Redshift doesn't have any special connection check.
245254 * And querying even system tables is billed.
You can’t perform that action at this time.
0 commit comments