forked from sqlalchemy-redshift/sqlalchemy-redshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull in set of reserved words from Redshift docs (sqlalchemy-redshift…
…#117) Pull in set of reserved words from Redshift docs Addresses sqlalchemy-redshift#94
- Loading branch information
Showing
5 changed files
with
75 additions
and
1 deletion.
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,17 @@ | ||
#!/usr/bin/env sh | ||
|
||
## Scrapes a list of Redshift reserved words from AWS docs | ||
## and formats for copying and pasting into Python code. | ||
|
||
## This was developed on macOS and may not directly translate to | ||
## other platforms. | ||
|
||
curl "https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html" \ | ||
| tr '\n' '\r' \ | ||
| sed 's/.*\(AES128.*WITHOUT\).*/\1/' \ | ||
| tr '\r' '\n' \ | ||
| sed 's/^\([A-Z0-9_]*\).*/"\1",/' \ | ||
| paste -s -d' ' - \ | ||
| fold -s -w 70 \ | ||
| awk '{print " "$0}' \ | ||
| tr 'A-Z' 'a-z' |
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