-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alpha support for SSH tunnel connections to Redshift/Postgres (#715)
* Add alpha support for SSH tunnel connections to Redshift/Postgres * add missing API dep * Fix imports * Review comments bump version
- Loading branch information
Showing
24 changed files
with
398 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,21 @@ | ||
import { Credentials } from "@dataform/api/commands/credentials"; | ||
import * as dbadapters from "@dataform/api/dbadapters"; | ||
import { dataform } from "@dataform/protos"; | ||
|
||
export async function list( | ||
credentials: Credentials, | ||
warehouse: string | ||
): Promise<dataform.ITarget[]> { | ||
const dbadapter = dbadapters.create(credentials, warehouse); | ||
try { | ||
return await dbadapter.tables(); | ||
} finally { | ||
await dbadapter.close(); | ||
} | ||
export async function list(dbadapter: dbadapters.IDbAdapter): Promise<dataform.ITarget[]> { | ||
return await dbadapter.tables(); | ||
} | ||
|
||
export async function get( | ||
credentials: Credentials, | ||
warehouse: string, | ||
dbadapter: dbadapters.IDbAdapter, | ||
target: dataform.ITarget | ||
): Promise<dataform.ITableMetadata> { | ||
const dbadapter = dbadapters.create(credentials, warehouse); | ||
try { | ||
return await dbadapter.table(target); | ||
} finally { | ||
await dbadapter.close(); | ||
} | ||
return await dbadapter.table(target); | ||
} | ||
|
||
export async function preview( | ||
credentials: Credentials, | ||
warehouse: string, | ||
dbadapter: dbadapters.IDbAdapter, | ||
target: dataform.ITarget, | ||
limitRows?: number | ||
): Promise<any[]> { | ||
const dbadapter = dbadapters.create(credentials, warehouse); | ||
try { | ||
return await dbadapter.preview(target, limitRows); | ||
} finally { | ||
await dbadapter.close(); | ||
} | ||
return await dbadapter.preview(target, limitRows); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.