s3select

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVBlock

type CSVBlock struct {
	AllowQuotedRecordDelimiter *bool   `hcl:"allow_quoted_record_delimiter" json:"AllowQuotedRecordDelimiter,omitempty"`
	FileHeaderInfo             *string `hcl:"file_header_info" json:"FileHeaderInfo,omitempty"`
	FieldDelimiter             *string `hcl:"field_delimiter" json:"FieldDelimiter,omitempty"`
	QuoteCharacter             *string `hcl:"quote_character" json:"QuoteCharacter,omitempty"`
	QuoteEscapeCharacter       *string `hcl:"quote_escape_character" json:"QuoteEscapeCharacter,omitempty"`
	RecordDelimiter            *string `hcl:"record_delimiter" json:"RecordDelimiter,omitempty"`
	Comments                   *string `hcl:"comments" json:"Comments,omitempty"`
}

type InputSerializationBlock

type InputSerializationBlock struct {
	CompressionType *string       `hcl:"compression_type" json:"CompressionType,omitempty"`
	CSV             *CSVBlock     `hcl:"csv,block" json:"CSV,omitempty"`
	JSON            *JSONBlock    `hcl:"json,block" json:"JSON,omitempty"`
	Parquet         *ParquetBlock `hcl:"parquet,block" json:"Parquet,omitempty"`
}

type JSONBlock

type JSONBlock struct {
	Type string `hcl:"type" json:"Type,omitempty"`
}

type ParquetBlock

type ParquetBlock struct{}

type Provider

type Provider struct {
	Type string
	Name string
	ProviderParameter
}

func NewProvider

func NewProvider(pp *provider.ProviderParameter) (*Provider, error)

func (*Provider) NewQuery

func (p *Provider) NewQuery(name string, body hcl.Body, evalCtx *hcl.EvalContext) (provider.Query, error)

type ProviderParameter

type ProviderParameter struct {
	Region    string `json:"region" hcl:"region"`
	ParseTime bool   `json:"parse_time" hcl:"parse_time"`
}

type Query

type Query struct {
	Name             string
	Provder          *Provider
	Expression       hcl.Expression
	ObjectKeyPrefix  hcl.Expression
	BucketName       string
	ExpressionParams sqlprovider.QueryParams
	DSNQueryParams   url.Values
}

func (*Query) Run

func (q *Query) Run(ctx context.Context, evalCtx *hcl.EvalContext) (*provider.QueryResult, error)

type QueryParamter

type QueryParamter struct {
	Expression         hcl.Expression           `hcl:"expression,optional"`
	Parameters         hcl.Expression           `hcl:"params,optional"`
	BucketName         string                   `hcl:"bucket_name"`
	ObjectKeyPrefix    hcl.Expression           `hcl:"object_key_prefix"`
	CompressionType    *string                  `hcl:"compression_type"`
	Format             *string                  `hcl:"format"`
	InputSerialization *InputSerializationBlock `hcl:"input_serialization,block"`
}

Jump to

Keyboard shortcuts

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