bigquerycommon

package
v0.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BQTypeStringFromToolType added in v0.17.0

func BQTypeStringFromToolType(toolType string) (string, error)

BQTypeStringFromToolType converts a tool parameter type string to a BigQuery standard SQL type string.

func DryRunQuery

func DryRunQuery(ctx context.Context, restService *bigqueryrestapi.Service, projectID string, location string, sql string, params []*bigqueryrestapi.QueryParameter, connProps []*bigqueryapi.ConnectionProperty) (*bigqueryrestapi.Job, error)

DryRunQuery performs a dry run of the SQL query to validate it and get metadata.

func InitializeDatasetParameters added in v0.17.0

func InitializeDatasetParameters(
	allowedDatasets []string,
	defaultProjectID string,
	projectKey, datasetKey string,
	projectDescription, datasetDescription string,
) (projectParam, datasetParam tools.Parameter)

InitializeDatasetParameters generates project and dataset tool parameters based on allowedDatasets.

func TableParser

func TableParser(sql, defaultProjectID string) ([]string, error)

TableParser is the main entry point for parsing a SQL string to find all referenced table IDs. It handles multi-statement SQL, comments, and recursive parsing of EXECUTE IMMEDIATE statements.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL