File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/cubejs-databricks-jdbc-driver/src Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ import {
1515 QuerySchemasResult ,
1616 QueryTablesResult ,
1717 UnloadOptions ,
18- GenericDataBaseType
18+ GenericDataBaseType ,
19+ TablesSchema ,
20+ SchemaTableColumn ,
1921} from '@cubejs-backend/base-driver' ;
2022import {
2123 JDBCDriver ,
@@ -392,10 +394,10 @@ export class DatabricksDriver extends JDBCDriver {
392394 /**
393395 * Returns tables meta data object.
394396 */
395- public override async tablesSchema ( ) : Promise < Record < string , Record < string , object > > > {
397+ public override async tablesSchema ( ) : Promise < TablesSchema > {
396398 const tables = await this . getTables ( ) ;
397399
398- const metadata : Record < string , Record < string , object > > = { } ;
400+ const metadata : TablesSchema = { } ;
399401
400402 await Promise . all ( tables . map ( async ( { database, tableName } ) => {
401403 if ( ! ( database in metadata ) ) {
@@ -499,7 +501,7 @@ export class DatabricksDriver extends JDBCDriver {
499501 /**
500502 * Returns table columns types.
501503 */
502- public override async tableColumnTypes ( table : string ) : Promise < { name : any ; type : string ; } [ ] > {
504+ public override async tableColumnTypes ( table : string ) : Promise < SchemaTableColumn [ ] > {
503505 let tableFullName = '' ;
504506 const tableArray = table . split ( '.' ) ;
505507
@@ -538,6 +540,7 @@ export class DatabricksDriver extends JDBCDriver {
538540 result . push ( {
539541 name : column . col_name ,
540542 type : this . toGenericType ( column . data_type ) ,
543+ attributes : [ ] ,
541544 } ) ;
542545 }
543546
You can’t perform that action at this time.
0 commit comments