s3select

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const TypeName = "s3_select"

Variables

This section is empty.

Functions

func BuildQueryRunner

func BuildQueryRunner(name string, body hcl.Body, ctx *hcl.EvalContext) (queryrunner.QueryRunner, hcl.Diagnostics)

Types

type PreparedQuery

type PreparedQuery struct {
	*queryrunner.QueryBase

	Expression      hcl.Expression `hcl:"expression"`
	BucketName      string         `hcl:"bucket_name"`
	ObjectKeyPrefix hcl.Expression `hcl:"object_key_prefix"`
	ObjectKeySuffix *string        `hcl:"object_key_suffix"`
	ScanLimit       *string        `hcl:"scan_limit"`
	CompressionType string         `hcl:"compression_type"`
	ContinueOnError bool           `hcl:"continue_on_error,optional"`

	CSVBlock     *QueryCSVBlock     `hcl:"csv,block"`
	JSONBlock    *QueryJSONBlock    `hcl:"json,block"`
	ParquetBlock *QueryParquetBlock `hcl:"parquet,block"`
	// contains filtered or unexported fields
}

func (*PreparedQuery) Run

func (q *PreparedQuery) Run(ctx context.Context, variables map[string]cty.Value, functions map[string]function.Function) (*queryrunner.QueryResult, error)

type QueryCSVBlock

type QueryCSVBlock struct {
	AllowQuotedRecordDelimiter *bool   `hcl:"allow_quoted_record_delimiter"`
	FileHeaderInfo             *string `hcl:"file_header_info"`
	FieldDelimiter             *string `hcl:"field_delimiter"`
	QuoteCharacter             *string `hcl:"quote_character"`
	QuoteEscapeCharacter       *string `hcl:"quote_escape_character"`
	RecordDelimiter            *string `hcl:"record_delimiter"`
}

type QueryJSONBlock

type QueryJSONBlock struct {
	Type string `hcl:"type"`
}

type QueryParquetBlock

type QueryParquetBlock struct{}

type QueryRunner

type QueryRunner struct {
	Region *string `hcl:"region"`
	// contains filtered or unexported fields
}

func (*QueryRunner) Name

func (r *QueryRunner) Name() string

func (*QueryRunner) Prepare

func (r *QueryRunner) Prepare(base *queryrunner.QueryBase) (queryrunner.PreparedQuery, hcl.Diagnostics)

func (*QueryRunner) RunQuery

func (r *QueryRunner) RunQuery(ctx context.Context, params *runQueryParameters) (*queryrunner.QueryResult, error)

func (*QueryRunner) Type

func (r *QueryRunner) Type() string

Jump to

Keyboard shortcuts

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