1
0
Fork 0
mirror of synced 2024-07-15 11:15:59 +12:00

Merge pull request #10603 from Budibase/budi-6932/verify_snowflake

Verify snowflake connection
This commit is contained in:
Adria Navarro 2023-05-16 13:31:57 +02:00 committed by GitHub
commit 6b2db71f87

View file

@ -1,4 +1,5 @@
import {
ConnectionInfo,
DatasourceFeature,
Integration,
QueryType,
@ -71,6 +72,18 @@ class SnowflakeIntegration {
this.client = new Snowflake(config)
}
async testConnection(): Promise<ConnectionInfo> {
try {
await this.client.connect()
return { connected: true }
} catch (e: any) {
return {
connected: false,
error: e.message as string,
}
}
}
async internalQuery(query: SqlQuery) {
await this.client.connect()
try {