flightsql

package
v0.11.609 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMaterializer

func NewMaterializer(fullRefresh bool) *pipeline.Materializer

NewMaterializer builds a materializer for the default (Dremio) dialect. It is used by preview commands (render / render-ddl) that do not resolve a specific connection. The run path uses NewMaterializerForDialect via the operator so that each connection's configured dialect is honored.

func NewMaterializerForDialect

func NewMaterializerForDialect(dialect string, fullRefresh bool) *pipeline.Materializer

NewMaterializerForDialect builds a materializer for a specific Flight SQL dialect (see dialect.go). An unknown dialect falls back to the ANSI baseline.

Types

type BasicOperator

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

func NewBasicOperator

func NewBasicOperator(conn config.ConnectionGetter, extractor query.QueryExtractor, fullRefresh bool, hoister pipeline.DeclareHoister, parser *sqlparser.SQLParser) *BasicOperator

func (BasicOperator) Run

func (BasicOperator) RunTask

type Client

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

func NewClient

func NewClient(c Config) (*Client, error)

func (*Client) Dialect

func (c *Client) Dialect() string

Dialect returns the configured materialization dialect (e.g. "dremio", "sail"), used by the operator to render dialect-appropriate SQL.

func (*Client) GetDatabaseSummary

func (c *Client) GetDatabaseSummary(ctx context.Context) (*ansisql.DBDatabase, error)

GetDatabaseSummary introspects the available schemas and tables using the ANSI information_schema, which Flight SQL engines such as Dremio expose.

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

func (*Client) RunQueryWithoutResult

func (c *Client) RunQueryWithoutResult(ctx context.Context, query *query.Query) error

func (*Client) Select

func (c *Client) Select(ctx context.Context, query *query.Query) ([][]interface{}, error)

func (*Client) SelectWithSchema

func (c *Client) SelectWithSchema(ctx context.Context, queryObj *query.Query) (*query.QueryResult, error)

type Config

type Config struct {
	Host          string
	Port          int
	Username      string
	Password      string
	Token         string
	Database      string
	Dialect       string
	TLS           bool
	TLSSkipVerify bool
}

Config holds the connection parameters for an Arrow Flight SQL platform.

Flight SQL is a wire protocol rather than a SQL dialect, so the same connection settings work against any Flight SQL compatible engine (Dremio being the first one we support). The Dialect field selects the SQL dialect used when rendering materializations (see dialect.go); it defaults to "dremio" when left empty.

Authentication is either username/password (Dremio Software) or a bearer Token / Personal Access Token (Dremio Cloud); the two are mutually exclusive. TLS must be enabled for Dremio Cloud.

func (Config) GetDatabase

func (c Config) GetDatabase() string

func (Config) ToDSN

func (c Config) ToDSN() (string, error)

ToDSN builds a DSN understood by the ADBC Flight SQL database/sql driver. The driver parses the DSN as a ";"-separated list of "key=value" options, where the keys are the standard ADBC option names (uri, username, password, adbc.flight.sql.*).

The driver does not unescape values, so credentials are passed through verbatim; a ";" in a credential would split the DSN into a bogus option and fail to parse. We reject that explicitly rather than corrupt the value. ("=" is safe because the driver splits each option on its first "=" only.)

Jump to

Keyboard shortcuts

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