Documentation ¶
Index ¶
Constants ¶
View Source
const ( SMALLINT = iota INTEGER = iota BIGINT = iota DECIMAL = iota DOUBLE = iota BOOLEAN = iota CHAR = iota VARCHAR = iota DATE = iota TIMESTAMP = iota )
View Source
const SQLDateFormat = "2006-01-02"
Variables ¶
This section is empty.
Functions ¶
func DefaultDelimiter ¶
func DefaultDelimiter() string
Types ¶
type AWSConfiguration ¶
type AWSConfiguration struct { Redshift *RedshiftConnectionDetails `yaml:"redshift"` S3 *S3Configuration `yaml:"s3"` }
func ParseAWSConfiguration ¶
func ParseAWSConfiguration(file *os.File) (*AWSConfiguration, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *AWSConfiguration) (*Client, error)
func (*Client) ExtractSchema ¶
func (c *Client) ExtractSchema(table string) (*TableSchema, error)
func (*Client) Unload ¶
func (c *Client) Unload(table string, partition *DatePartition, whereClause string) (*UnloadResult, error)
type DatePartition ¶
type DatePartition struct { DateExpression string // expression used to extract relevant date for each row DateFilter time.Time // current partition date }
func NewDatePartition ¶
func NewDatePartition(expression string, t time.Time) *DatePartition
type RedshiftConnectionDetails ¶
type RedshiftConnectionDetails struct { Host string `yaml:"host"` Port int `yaml:"port"` User string `yaml:"user"` Database string `yaml:"db"` Password string `yaml:"password"` }
func (*RedshiftConnectionDetails) URLString ¶
func (c *RedshiftConnectionDetails) URLString() string
type RedshiftSource ¶
type RedshiftSource struct { Table string Schema *TableSchema Partition *DatePartition WhereClause string }
func (*RedshiftSource) SelectClause ¶
func (s *RedshiftSource) SelectClause() string
type S3Configuration ¶
type S3Configuration struct { Bucket string `yaml:"bucket"` AccessKey string `yaml:"access_key"` SecretKey string `yaml:"secret_key"` }
func (S3Configuration) ToRedshiftCredentialsClause ¶
func (c S3Configuration) ToRedshiftCredentialsClause() string
type TableSchema ¶
type TableSchema struct {
Columns []*Column
}
func (*TableSchema) String ¶
func (t *TableSchema) String() string
func (*TableSchema) ToBigQuerySchema ¶
func (in *TableSchema) ToBigQuerySchema() (*bq.TableSchema, error)
type UnloadResult ¶
Click to show internal directories.
Click to hide internal directories.