Documentation
¶
Overview ¶
Package s3select provides S3 Select input/output options and result helpers.
Package select provides SelectObjectContent helpers.
Package select provides SelectObjectContent helpers.
Package select provides SelectObjectContent helpers.
Index ¶
- type CSVFileHeaderInfo
- type CSVInputOptions
- func (c CSVInputOptions) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (c *CSVInputOptions) SetComments(val string)
- func (c *CSVInputOptions) SetFieldDelimiter(val string)
- func (c *CSVInputOptions) SetFileHeaderInfo(val CSVFileHeaderInfo)
- func (c *CSVInputOptions) SetQuoteCharacter(val string)
- func (c *CSVInputOptions) SetQuoteEscapeCharacter(val string)
- func (c *CSVInputOptions) SetRecordDelimiter(val string)
- type CSVOutputOptions
- func (c CSVOutputOptions) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (c *CSVOutputOptions) SetFieldDelimiter(val string)
- func (c *CSVOutputOptions) SetQuoteCharacter(val string)
- func (c *CSVOutputOptions) SetQuoteEscapeCharacter(val string)
- func (c *CSVOutputOptions) SetQuoteFields(val CSVQuoteFields)
- func (c *CSVOutputOptions) SetRecordDelimiter(val string)
- type CSVQuoteFields
- type InputSerialization
- type JSONInputOptions
- type JSONOutputOptions
- type JSONType
- type Options
- type OutputSerialization
- type ParquetInputOptions
- type ProgressMessage
- type QueryExpressionType
- type RequestProgress
- type Results
- type SelectCompressionType
- type StatsMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVFileHeaderInfo ¶
type CSVFileHeaderInfo string
CSVFileHeaderInfo controls how CSV headers are handled.
const ( CSVFileHeaderInfoNone CSVFileHeaderInfo = "NONE" CSVFileHeaderInfoIgnore CSVFileHeaderInfo = "IGNORE" CSVFileHeaderInfoUse CSVFileHeaderInfo = "USE" )
type CSVInputOptions ¶
type CSVInputOptions struct {
FileHeaderInfo CSVFileHeaderInfo
RecordDelimiter string
FieldDelimiter string
QuoteCharacter string
QuoteEscapeCharacter string
Comments string
// contains filtered or unexported fields
}
CSVInputOptions describes CSV input options.
func (CSVInputOptions) MarshalXML ¶
func (c CSVInputOptions) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML renders CSV input options as XML.
func (*CSVInputOptions) SetComments ¶
func (c *CSVInputOptions) SetComments(val string)
SetComments sets the comments character in the CSV input options.
func (*CSVInputOptions) SetFieldDelimiter ¶
func (c *CSVInputOptions) SetFieldDelimiter(val string)
SetFieldDelimiter sets the field delimiter in the CSV input options.
func (*CSVInputOptions) SetFileHeaderInfo ¶
func (c *CSVInputOptions) SetFileHeaderInfo(val CSVFileHeaderInfo)
SetFileHeaderInfo sets the file header info in the CSV input options.
func (*CSVInputOptions) SetQuoteCharacter ¶
func (c *CSVInputOptions) SetQuoteCharacter(val string)
SetQuoteCharacter sets the quote character in the CSV input options.
func (*CSVInputOptions) SetQuoteEscapeCharacter ¶
func (c *CSVInputOptions) SetQuoteEscapeCharacter(val string)
SetQuoteEscapeCharacter sets the quote escape character in the CSV input options.
func (*CSVInputOptions) SetRecordDelimiter ¶
func (c *CSVInputOptions) SetRecordDelimiter(val string)
SetRecordDelimiter sets the record delimiter in the CSV input options.
type CSVOutputOptions ¶
type CSVOutputOptions struct {
QuoteFields CSVQuoteFields
RecordDelimiter string
FieldDelimiter string
QuoteCharacter string
QuoteEscapeCharacter string
// contains filtered or unexported fields
}
CSVOutputOptions describes CSV output options.
func (CSVOutputOptions) MarshalXML ¶
func (c CSVOutputOptions) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML renders CSV output options as XML.
func (*CSVOutputOptions) SetFieldDelimiter ¶
func (c *CSVOutputOptions) SetFieldDelimiter(val string)
SetFieldDelimiter sets the field delimiter character in the CSV output options.
func (*CSVOutputOptions) SetQuoteCharacter ¶
func (c *CSVOutputOptions) SetQuoteCharacter(val string)
SetQuoteCharacter sets the quote character in the CSV output options.
func (*CSVOutputOptions) SetQuoteEscapeCharacter ¶
func (c *CSVOutputOptions) SetQuoteEscapeCharacter(val string)
SetQuoteEscapeCharacter sets the quote escape character in the CSV output options.
func (*CSVOutputOptions) SetQuoteFields ¶
func (c *CSVOutputOptions) SetQuoteFields(val CSVQuoteFields)
SetQuoteFields sets the quote field parameter in the CSV output options.
func (*CSVOutputOptions) SetRecordDelimiter ¶
func (c *CSVOutputOptions) SetRecordDelimiter(val string)
SetRecordDelimiter sets the record delimiter character in the CSV output options.
type CSVQuoteFields ¶
type CSVQuoteFields string
CSVQuoteFields controls how CSV fields are quoted.
const ( CSVQuoteFieldsAlways CSVQuoteFields = "Always" CSVQuoteFieldsAsNeeded CSVQuoteFields = "AsNeeded" )
type InputSerialization ¶
type InputSerialization struct {
CompressionType SelectCompressionType `xml:"CompressionType,omitempty"`
Parquet *ParquetInputOptions `xml:"Parquet,omitempty"`
CSV *CSVInputOptions `xml:"CSV,omitempty"`
JSON *JSONInputOptions `xml:"JSON,omitempty"`
}
InputSerialization describes the input serialization for select.
type JSONInputOptions ¶
type JSONInputOptions struct {
Type JSONType
// contains filtered or unexported fields
}
JSONInputOptions describes JSON input options.
func (JSONInputOptions) MarshalXML ¶
func (j JSONInputOptions) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML renders JSON input options as XML.
func (*JSONInputOptions) SetType ¶
func (j *JSONInputOptions) SetType(typ JSONType)
SetType sets the JSON type in the JSON input options.
type JSONOutputOptions ¶
type JSONOutputOptions struct {
RecordDelimiter string
// contains filtered or unexported fields
}
JSONOutputOptions describes JSON output options.
func (JSONOutputOptions) MarshalXML ¶
func (j JSONOutputOptions) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML renders JSON output options as XML.
func (*JSONOutputOptions) SetRecordDelimiter ¶
func (j *JSONOutputOptions) SetRecordDelimiter(val string)
SetRecordDelimiter sets the record delimiter in the JSON output options.
type Options ¶
type Options struct {
XMLName xml.Name `xml:"SelectObjectContentRequest"`
Expression string `xml:"Expression"`
ExpressionType QueryExpressionType `xml:"ExpressionType"`
InputSerialization InputSerialization `xml:"InputSerialization"`
OutputSerialization OutputSerialization `xml:"OutputSerialization"`
RequestProgress RequestProgress `xml:"RequestProgress"`
ServerSideEncryption sse.Encrypter `xml:"-"`
}
Options represents the select request payload.
type OutputSerialization ¶
type OutputSerialization struct {
CSV *CSVOutputOptions `xml:"CSV,omitempty"`
JSON *JSONOutputOptions `xml:"JSON,omitempty"`
}
OutputSerialization describes the output serialization for select.
type ParquetInputOptions ¶
type ParquetInputOptions struct{}
ParquetInputOptions describes Parquet input options.
type ProgressMessage ¶
type ProgressMessage struct {
XMLName xml.Name `xml:"Progress"`
StatsMessage
}
ProgressMessage contains progress XML messages.
type QueryExpressionType ¶
type QueryExpressionType string
QueryExpressionType describes the query language.
const (
QueryExpressionTypeSQL QueryExpressionType = "SQL"
)
type RequestProgress ¶
type RequestProgress struct {
Enabled bool `xml:"Enabled"`
}
RequestProgress controls select progress messages.
type Results ¶
type Results struct {
// contains filtered or unexported fields
}
Results provides a streaming reader for select output.
func NewResults ¶
NewResults creates a select result parser and starts streaming.
func (*Results) Progress ¶
func (s *Results) Progress() *ProgressMessage
Progress returns select progress updates.
func (*Results) Stats ¶
func (s *Results) Stats() *StatsMessage
Stats returns select stats after completion.
type SelectCompressionType ¶
type SelectCompressionType string
SelectCompressionType describes input compression.
const ( SelectCompressionNone SelectCompressionType = "NONE" SelectCompressionGZIP SelectCompressionType = "GZIP" SelectCompressionBZIP SelectCompressionType = "BZIP2" SelectCompressionZSTD SelectCompressionType = "ZSTD" SelectCompressionLZ4 SelectCompressionType = "LZ4" SelectCompressionS2 SelectCompressionType = "S2" SelectCompressionSNAPPY SelectCompressionType = "SNAPPY" )