Documentation ¶
Index ¶
- Constants
- func ColumnsWithDataTypes(columns map[string]string, prefix string) string
- func Connect(cred RedshiftCredentialsT) (*sql.DB, error)
- func Init()
- type HandleT
- func (rs *HandleT) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) error
- func (rs *HandleT) AlterColumn(tableName, columnName, columnType string) (err error)
- func (rs *HandleT) Cleanup()
- func (rs *HandleT) Connect(warehouse warehouseutils.Warehouse) (client.Client, error)
- func (rs *HandleT) CrashRecover(warehouse warehouseutils.Warehouse) (err error)
- func (rs *HandleT) CreateSchema() (err error)
- func (rs *HandleT) CreateTable(tableName string, columns map[string]string) (err error)
- func (rs *HandleT) DeleteBy(tableNames []string, params warehouseutils.DeleteByParams) (err error)
- func (*HandleT) DownloadIdentityRules(*misc.GZipWriter) (err error)
- func (rs *HandleT) DropTable(tableName string) (err error)
- func (rs *HandleT) FetchSchema(warehouse warehouseutils.Warehouse) (schema, unrecognizedSchema warehouseutils.SchemaT, err error)
- func (rs *HandleT) GetTotalCountInTable(ctx context.Context, tableName string) (total int64, err error)
- func (*HandleT) IsEmpty(_ warehouseutils.Warehouse) (empty bool, err error)
- func (*HandleT) LoadIdentityMappingsTable() (err error)
- func (*HandleT) LoadIdentityMergeRulesTable() (err error)
- func (rs *HandleT) LoadTable(tableName string) error
- func (rs *HandleT) LoadTestTable(location, tableName string, _ map[string]interface{}, format string) (err error)
- func (rs *HandleT) LoadUserTables() map[string]error
- func (rs *HandleT) SetConnectionTimeout(timeout time.Duration)
- func (rs *HandleT) Setup(warehouse warehouseutils.Warehouse, uploader warehouseutils.UploaderI) (err error)
- func (rs *HandleT) TestConnection(warehouse warehouseutils.Warehouse) (err error)
- type RedshiftCredentialsT
- type S3ManifestEntryMetadataT
- type S3ManifestEntryT
- type S3ManifestT
Constants ¶
View Source
const ( RSHost = "host" RSPort = "port" RSDbName = "database" RSUserName = "user" RSPassword = "password" )
String constants for redshift destination config
Variables ¶
This section is empty.
Functions ¶
func ColumnsWithDataTypes ¶ added in v0.1.10
Types ¶
type HandleT ¶
type HandleT struct { Db *sql.DB Namespace string Warehouse warehouseutils.Warehouse Uploader warehouseutils.UploaderI ConnectTimeout time.Duration }
func (*HandleT) AddColumns ¶ added in v1.3.0
func (rs *HandleT) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) error
func (*HandleT) AlterColumn ¶ added in v0.1.10
func (*HandleT) CrashRecover ¶
func (rs *HandleT) CrashRecover(warehouse warehouseutils.Warehouse) (err error)
func (*HandleT) CreateSchema ¶ added in v0.1.10
func (*HandleT) CreateTable ¶ added in v0.1.10
func (*HandleT) DeleteBy ¶ added in v1.2.0
func (rs *HandleT) DeleteBy(tableNames []string, params warehouseutils.DeleteByParams) (err error)
func (*HandleT) DownloadIdentityRules ¶ added in v0.1.10
func (*HandleT) DownloadIdentityRules(*misc.GZipWriter) (err error)
func (*HandleT) FetchSchema ¶ added in v0.1.10
func (rs *HandleT) FetchSchema(warehouse warehouseutils.Warehouse) (schema, unrecognizedSchema warehouseutils.SchemaT, err error)
FetchSchema queries redshift and returns the schema associated with provided namespace
func (*HandleT) GetTotalCountInTable ¶ added in v0.1.10
func (*HandleT) IsEmpty ¶ added in v0.1.10
func (*HandleT) IsEmpty(_ warehouseutils.Warehouse) (empty bool, err error)
func (*HandleT) LoadIdentityMappingsTable ¶ added in v0.1.10
func (*HandleT) LoadIdentityMergeRulesTable ¶ added in v0.1.10
func (*HandleT) LoadTestTable ¶ added in v0.1.10
func (*HandleT) LoadUserTables ¶ added in v0.1.10
func (*HandleT) SetConnectionTimeout ¶ added in v0.1.10
func (*HandleT) Setup ¶ added in v0.1.10
func (rs *HandleT) Setup(warehouse warehouseutils.Warehouse, uploader warehouseutils.UploaderI) (err error)
func (*HandleT) TestConnection ¶ added in v0.1.10
func (rs *HandleT) TestConnection(warehouse warehouseutils.Warehouse) (err error)
type RedshiftCredentialsT ¶
type RedshiftCredentialsT struct { Host string Port string DbName string Username string Password string TunnelInfo *tunnelling.TunnelInfo // contains filtered or unexported fields }
type S3ManifestEntryMetadataT ¶ added in v0.1.10
type S3ManifestEntryMetadataT struct {
ContentLength int64 `json:"content_length"`
}
type S3ManifestEntryT ¶
type S3ManifestEntryT struct { Url string `json:"url"` Mandatory bool `json:"mandatory"` Metadata S3ManifestEntryMetadataT `json:"meta"` }
type S3ManifestT ¶
type S3ManifestT struct {
Entries []S3ManifestEntryT `json:"entries"`
}
Click to show internal directories.
Click to hide internal directories.