diff --git a/plugins/packages/athena/lib/index.ts b/plugins/packages/athena/lib/index.ts index 9bc5f09e89..aa865898c2 100644 --- a/plugins/packages/athena/lib/index.ts +++ b/plugins/packages/athena/lib/index.ts @@ -2,7 +2,7 @@ import { QueryError, QueryResult, QueryService, ConnectionTestResult } from '@to import { SourceOptions, QueryOptions } from './types'; export default class Athena implements QueryService { - async run(sourceOptions: SourceOptions, queryOptions: QueryOptions, dataSourceId: string): Promise { + async run(sourceOptions: SourceOptions, queryOptions: QueryOptions): Promise { let result = {}; const athenaClient = await this.getConnection(sourceOptions); const myQuery = { @@ -29,7 +29,7 @@ export default class Athena implements QueryService { async testConnection(sourceOptions: SourceOptions): Promise { const athenaClient = await this.getConnection(sourceOptions); try { - await athenaClient.query('SHOW DATABASES'); + await athenaClient.query('SHOW TABLES'); } catch (error) { throw new Error(error); } @@ -37,7 +37,7 @@ export default class Athena implements QueryService { status: 'ok', }; } - async getConnection(sourceOptions: SourceOptions, queryOptions?: QueryOptions): Promise { + async getConnection(sourceOptions: SourceOptions): Promise { const AthenaExpress = require('athena-express'), AWS = require('aws-sdk'), awsCredentials = {