Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultJinjaRenderer = jinja.NewRenderer(jinja.Context{ "ds": time.Now().Format("2006-01-02"), "ds_nodash": time.Now().Format("20060102"), "data_interval_start": time.Now().AddDate(0, 0, -1).Format(time.RFC3339), "data_interval_end": time.Now().Format(time.RFC3339), "utils": map[string]interface{}{ "date_add": func(str string, days int) string { return str }, "date_format": func(str, inputFormat, outputFormat string) string { return str }, }, })
Functions ¶
This section is empty.
Types ¶
type FileQuerySplitterExtractor ¶
FileQuerySplitterExtractor is a regular file extractor, but it splits the queries in the given file into multiple instances. For usecases that require EXPLAIN statements, such as validating Snowflake queries, it is not possible to EXPLAIN a multi-query string directly, therefore we have to split them.
func (FileQuerySplitterExtractor) ExtractQueriesFromString ¶ added in v0.7.1
func (f FileQuerySplitterExtractor) ExtractQueriesFromString(content string) ([]*Query, error)
type WholeFileExtractor ¶
WholeFileExtractor is a regular file extractor that returns the whole file content as the query string. It is useful for cases where the whole file content can be treated as a single query, such as validating GoogleCloudPlatform queries via dry-run.
func (*WholeFileExtractor) ExtractQueriesFromString ¶ added in v0.7.1
func (f *WholeFileExtractor) ExtractQueriesFromString(content string) ([]*Query, error)
Click to show internal directories.
Click to hide internal directories.