snowflake

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AuthTypePassword         = snowflakeclient.AuthTypePassword
	AuthTypeWorkloadIdentity = snowflakeclient.AuthTypeWorkloadIdentity
)

Variables

This section is empty.

Functions

func ValidateCredentials

func ValidateCredentials(credentials Credentials) error

ValidateCredentials enforces the public Snowflake authentication contract without opening a session.

Types

type Config

type Config struct {
	WIFObjects     []snowflakewif.ObjectGrant            `json:"wif_objects,omitempty"`
	Account        string                                `json:"account" validate:"required"`
	Warehouse      string                                `json:"warehouse" validate:"required"`
	Database       string                                `json:"database" validate:"required"`
	Schema         string                                `json:"schema" validate:"required"`
	Role           string                                `json:"role,omitempty"`
	ConnectTimeout int                                   `json:"connect_timeout,omitempty"`
	WIFTokenFile   string                                `json:"_wif_token_file,omitempty"`
	WIFTokenSource func(context.Context) (string, error) `json:"-"`
}

Config contains non-sensitive Snowflake session configuration owned by the Braidplane connector boundary.

func (Config) ValidateOnboarding

func (config Config) ValidateOnboarding() error

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

Connector executes Snowflake SQL through the official database/sql driver.

func New

func New(ctx context.Context, config Config, credentials Credentials) (*Connector, error)

New opens and verifies a Snowflake connection pool.

func (*Connector) Close

func (c *Connector) Close() error

Close releases the Snowflake connection pool.

func (*Connector) Execute

func (c *Connector) Execute(
	ctx context.Context,
	queryData json.RawMessage,
	params map[string]types.TypedParam,
	limits ...types.ExecutionLimits,
) (*result.ExecutionResult, error)

Execute runs a parameterized source query or explicitly authored INSERT sink statement.

func (*Connector) GetCapabilities

func (c *Connector) GetCapabilities() sqlconnector.Capabilities

GetCapabilities reports the initial Snowflake SQL connector capabilities.

func (*Connector) IntrospectSchema

func (c *Connector) IntrospectSchema(ctx context.Context) (*sqlconnector.Schema, error)

IntrospectSchema reads visible tables and columns from Snowflake information_schema.

func (*Connector) TestConnection

func (c *Connector) TestConnection(ctx context.Context) error

TestConnection verifies the configured account and warehouse session.

type Credentials

type Credentials struct {
	AuthType string `json:"auth_type" validate:"required"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

Credentials selects password or deployment-owned workload identity authentication.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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