-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add RedShift #297
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2102172
[WIP]add minimum template for extension-driver-redshift
cyyeh aa7e212
[WIP]allow execute sql and pass parameters inside
cyyeh f3cb9e6
[WIP] add tests
cyyeh b881f97
remove
cyyeh beef75b
add README
cyyeh 9940e68
destroy redshift client when necessary
cyyeh f8338c8
allow other optional settings and refine readme
cyyeh 33b768c
Merge branch 'develop' into feature/add-redshift
cyyeh 275b6ec
refine readme
cyyeh 604d4e4
refine comments
cyyeh 34cbb55
test circleci
cyyeh d005695
change @aws-sdk/client-redshift-data location
cyyeh 77080dd
add semicolon
cyyeh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# extension-driver-redshift | ||
|
||
[@aws-sdk/client-redshift-data](https://www.npmjs.com/package/@aws-sdk/client-redshift-data) driver for VulcanSQL. | ||
|
||
reference: https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-redshift-data | ||
|
||
## Install | ||
|
||
1. Install package | ||
|
||
```bash | ||
npm i @vulcan-sql/extension-driver-redshift | ||
``` | ||
|
||
2. Update `vulcan.yaml`, enable the extension. | ||
|
||
```yaml | ||
extensions: | ||
redshift: '@vulcan-sql/extension-driver-redshift' | ||
``` | ||
|
||
3. Create a new profile in `profiles.yaml` or in your profiles' paths. | ||
|
||
```yaml | ||
- name: redshift # profile name | ||
type: redshift | ||
allow: "*" | ||
connection: | ||
# please see the type definition of RedshiftDataClientConfig | ||
# https://github.com/aws/aws-sdk-js-v3/blob/29056f4ca545f7e5cf951b915bb52178305fc305/clients/client-redshift-data/src/RedshiftDataClient.ts#L253C18-L253C42 | ||
credentials: | ||
accessKeyId: <REDSHIFT_ACCESS_KEY_ID> | ||
secretAccessKey: <REDSHIFT_SECRET_ACCESS_KEY> | ||
# please see the type definition of ExecuteStatementCommandInput(omit Sql and Parameters) | ||
# https://github.com/aws/aws-sdk-js-v3/blob/29056f4ca545f7e5cf951b915bb52178305fc305/clients/client-redshift-data/src/models/models_0.ts#L805C18-L805C39 | ||
Database: <REDSHIFT_DATABASE> | ||
WorkgroupName: <REDSHIFT_WORKGROUP_NAME> | ||
``` | ||
|
||
## Testing | ||
|
||
```bash | ||
nx test extension-driver-redshift | ||
``` | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
To run test, the following environment variables are required: | ||
|
||
- REDSHIFT_ACCESS_KEY_ID | ||
- REDSHIFT_SECRET_ACCESS_KEY | ||
- REDSHIFT_DATABASE | ||
- REDSHIFT_WORKGROUP_NAME |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
displayName: 'extension-driver-redshift', | ||
preset: '../../jest.preset.ts', | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: '<rootDir>/tsconfig.spec.json', | ||
}, | ||
}, | ||
transform: { | ||
'^.+\\.[tj]s$': 'ts-jest', | ||
}, | ||
moduleFileExtensions: ['ts', 'js', 'html'], | ||
coverageDirectory: '../../coverage/packages/extension-driver-redshift', | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may suggest you put the
@aws-sdk/client-redshift-data
package in theextension-driver-redshift
package, then the@aws-sdk/client-redshift-data
package will only installed when user add theextension-driver-redshift
You could refer to the
package.json
ofextension-driver-clubhouse
andextension-driver-snowflake
packages.