Documentation
¶
Index ¶
- func ConvertSnowflakeToGeneralDataObjects(snowflakeAccess []SnowflakeAccess, databaseName string, schemaName string) []ap.WhatItem
- func ExtractFromClauseInfo(stmt parser.TableExpr, tableInfo map[string]string)
- func ExtractInfoFromQuery(query string, databaseName string, schemaName string) ([]ap.WhatItem, error)
- func ExtractTableName(stmt parser.SimpleTableExpr, tableInfo map[string]string)
- func FormatQuery(query string, objects ...string) string
- func ParseSelectExpression(expr parser.SelectExpr, accessedSnowflakeObjects *[]SnowflakeAccess)
- func ParseSelectQuery(stmt parser.Select, objectsFromQueries *[]SnowflakeAccess)
- func ParseSnowflakeInformation(query string, databaseName string, schemaName string, ...) ([]ap.WhatItem, error)
- func ParseSyntaxTree(stmt parser.Statement, parsedQueries *[]SnowflakeAccess)
- type SnowflakeAccess
- type SnowflakeAccessedObjects
- type SnowflakeColumn
- type SnowflakeObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertSnowflakeToGeneralDataObjects ¶
func ConvertSnowflakeToGeneralDataObjects(snowflakeAccess []SnowflakeAccess, databaseName string, schemaName string) []ap.WhatItem
func ExtractFromClauseInfo ¶
func ExtractInfoFromQuery ¶
func ExtractTableName ¶
func ExtractTableName(stmt parser.SimpleTableExpr, tableInfo map[string]string)
func FormatQuery ¶ added in v0.10.3
Wrapper around fmt.Sprintf to properly format queries for Snowflake
func ParseSelectExpression ¶
func ParseSelectExpression(expr parser.SelectExpr, accessedSnowflakeObjects *[]SnowflakeAccess)
func ParseSelectQuery ¶
func ParseSelectQuery(stmt parser.Select, objectsFromQueries *[]SnowflakeAccess)
func ParseSnowflakeInformation ¶ added in v0.2.2
func ParseSyntaxTree ¶
func ParseSyntaxTree(stmt parser.Statement, parsedQueries *[]SnowflakeAccess)
Types ¶
type SnowflakeAccess ¶
type SnowflakeAccess struct {
Database string `json:"database"`
Schema string `json:"schema"`
Table string `json:"table"`
Column string `json:"column"`
Permissions []string `json:"permissions"`
}
func (SnowflakeAccess) String ¶
func (snowflakeObject SnowflakeAccess) String() string
type SnowflakeAccessedObjects ¶ added in v0.2.2
type SnowflakeAccessedObjects struct {
Columns []SnowflakeColumn `json:"columns"`
Domain string `json:"objectDomain"`
Id int `json:"objectId"`
Name string `json:"objectName"`
}
type SnowflakeColumn ¶ added in v0.2.2
type SnowflakeObject ¶ added in v0.10.3
type SnowflakeObject struct {
Database *string `json:"database"`
Schema *string `json:"schema"`
Table *string `json:"table"`
Column *string `json:"column"`
}
SnowflakeObject represents (parsed) Snowflake objects
func ParseFullName ¶ added in v0.10.3
func ParseFullName(fullName string) SnowflakeObject
Parse the fully-qualitied Snowflake resource name in a SnowflakeObject: https://docs.snowflake.com/en/sql-reference/identifiers-syntax.html
func (SnowflakeObject) GetFullName ¶ added in v0.10.3
func (s SnowflakeObject) GetFullName(withQuotes bool) string
Retrieve the 'full name' of the Snowflake object (i.e. database.schema.table). In some cases they need to be quoted, e.g. Snowflake queries, but in other cases they never need the outer double quotes, e.g. Raito Cloud. `withQuotes` controls this.
Click to show internal directories.
Click to hide internal directories.