Use Cases
AltaSQL’s patented technology and process can reduce the need for handcrafted coding to near zero via:
- Reliable, consistent, repeatable generation of properly qualified and quoted SQL statements from meta-data View Definitions within repositories
- Easily created and modified View Definitions with AltaSQL functions or with spreadsheets
- Copy and paste “Ready-to-Execute” AltaSQL Defined Functions” from a downloadable Excel spreadsheet, which use optional arguments, providing edit and execute capabilities.
This dramatically reduces the need to write multiple SQL statements during SQL development and generation, while reducing learning time.
The AltaSQL SBLD_SELECT function generates the same SELECT statement as used in a corresponding CREATE VIEW statement, i.e., as long as the SOURCE_OBJECTs exist, it is not necessary to CREATE the VIEW. This applies to all VIEW Definitions in the repository. Creating a new repository with SBLD_CREATE_REPO instantly provides VIRTUAL VIEWs for every object in the REPO, effectively eliminating the need for SELECT *
Query sharing is the defining feature of AltaSQL, aka “Virtual Views”. Any user with AltaSQL function execution privileges and SELECT privileges on a repository can generate SELECT statements. The user must have appropriate privileges to execute the generated statement, preserving Snowflake security settings. We recommend granting AltaSQL imported privileges to PUBLIC if this is permitted.
SQL does not provide for COMMENTs in SELECT statements; only COMMENTs in the underlying Snowflake object are available. AltaSQL’s searchable View Definitions include COMMENTs for all columns in the View Definition. AltaSQL Tags allow additional meta-data for View Definitions.
AltaSQL’s patented technology enables modular construction for generating SQL statements via:
- Decoupling the SELECT columns, FROM clause, and POST From clause for SELECT statements and the CREATE clause for DDL generation
- Using components stored as AltaSQL Tags as argument values via the ASDFs SBLD_GET_TAG_VALUE and SBLD_GET_QUOTED_TAG_VALUE
- Optional arguments providing finer grained control for SQL statement generation
Create multiple view definitionsnaming conventions for the same data with new VIEW Definitions, both via SELECT from Virtual VIEW and CREATING Snowflake VIEWs. Enhance LLM usage with natural language column and object names. Translate into different languages. Create “ad-hoc” friendly UPPER_CASE_SNAKE column names.
ALtaSQL’s SBLD_SELECT function creates a fully qualified, properly quoted SELECT statement from a View Definition based on an existing Snowflake objects, replacing the effort and wasted credits required for building SELECT * with Snowflakes RENAME, EXCLUDE and REPLACE features
- Add expressions with comments to View Definitions
- Change column and data qualifications to fit desired usage patterns
Snowflake doesn't support Virtual Column. Add Virtuzl Columns to View Definition as "expression" with comments!
- Create VIEW Definitions with defined sets of columns from data sets with large numbers of columns providing both Virtual View and generated Snowflake VIEW
AltaSQL’s CREATE VIEW “Ready-to-Execute” generation functions, meta-data management functions, and column transformations enable fast and reliable development of multiple, full featured Snowflake VIEWs using the same data source. No need to manually create separate CREATE VIEW statements for different combinations of features.
- Automatically generated column comments, Dynamic Data Masks and column Tags
- Object Tags, Role Base Access Control
- Full control of Snowflake CREATE VIEW parameters
- Specification of VIEW Name, destination database and schema
AltaSQL Tags data catalog capabilities enable creating and managing reusable components for generating, using and documenting SQL statements including:
- FROM_CLAUSEs
- POST_FROM_CLAUSEs
- Session variable settings
- Usage instructions
- Predefined queries
- SQL expressions
Pure SQL implementation enables bulk operations and script generation to enhance productivity
Generate Snowflake VIEWs from View Definitions based on Shared Database objects with ROW Access, Dynamic Data Masking, Snowflake Tags, additional comments and AltaSQL transformations
Use layered, reusable VIEWs to build and deliver sophisticated business solutions.
AltaSQL Tags provide the rich semantics enabling LLM Agents (and humans) to deterministically use AltaSQL to generate SELECT statements wthout hallucinations.