Skip to content

orellabac/snowflake-sp-syntax-coloring

Repository files navigation

Syntax Coloring for Snowflake Stored Procedures

This is a simple Syntax Coloring Extension for Snowflake Stored Procedures and now also for python scripts.

This extension is more useful if you are using the SnowConvert tool to move code from Teradata, Oracle or SQL Server to Snowflake.

Release Notes

1.0.0

Initial release of syntax coloring for SnowScript

1.0.1

Some minor reviews

1.0.2

Added support for doing SQL Syntax highlight. This is currently being done only inside EXEC(sql) or snowconvert_helpers.execute_sql_statement(""" sql """)

1.0.3

Fixed issue that required a new line character for hightlight on EXEC or CURSOR calls. Added support to hightlight the snowflake.execute and snowflake.createStatement calls as well.

1.0.4

Fixed issue with EXEC helper delimiter in both JS and Python scripts. Thanks to Jonathan!!!

1.0.5

Added support to highlight SELECT calls.

1.0.6

Added support to highlight INSERT_TEMP calls. Also integrating commands for quick selection.

1.0.7

Republish

1.0.9

Adding support for java / scala / python and fix issues with snowscript

Examples

General JS Highlight

sample

SQL Highlight inside the procedures

sample1

SQL Highlight in python

sample2

Keyword shorkcuts extensions

I copied this excellent extensions from https://github.com/dbankier/vscode-quick-select/

They are very handy :) specially to select all the SQL or all the parameters

Usage

Here some examples - and it supports multiple selections.

In the examples below use CTRL instead of for Windows.

k "

doublequotes

k '

singlequotes

NEW: You can also use this following shortcut to select either single, double quotes or backticks

k ;

NEW: You can also use this following shortcut to toggle quotes, e.g. "word" to 'word'

k :

NOTE: the extensions can be configured to exclude backticks from selection or switching

k `

singlequotes

k ( and k [ and k {

Using the following performs and outer selection:

k ) and k ] and k }

Or if you have already made in inner selection, use the same key combination again to expand to an outer selection.

brackets

k <

This also selects the matching tag.

k >

This matches the tag value.

brackets

About

Simple Syntax Coloring for Snowflake SP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published