Documentation ¶
Index ¶
- Constants
- func ColumnsWithDataTypes(columns map[string]string, prefix string) string
- func Connect(cred SnowflakeCredentialsT) (*sql.DB, error)
- func Init()
- type HandleT
- func (sf *HandleT) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
- func (*HandleT) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
- func (sf *HandleT) Cleanup()
- func (sf *HandleT) Connect(warehouse warehouseutils.Warehouse) (client.Client, error)
- func (*HandleT) CrashRecover(_ warehouseutils.Warehouse) (err error)
- func (sf *HandleT) CreateSchema() (err error)
- func (sf *HandleT) CreateTable(tableName string, columnMap map[string]string) (err error)
- func (sf *HandleT) DeleteBy(tableNames []string, params warehouseutils.DeleteByParams) (err error)
- func (sf *HandleT) DownloadIdentityRules(gzWriter *misc.GZipWriter) (err error)
- func (sf *HandleT) DropTable(tableName string) (err error)
- func (sf *HandleT) ErrorMappings() []model.JobError
- func (sf *HandleT) FetchSchema(warehouse warehouseutils.Warehouse) (schema, unrecognizedSchema warehouseutils.SchemaT, err error)
- func (sf *HandleT) GetTotalCountInTable(ctx context.Context, tableName string) (int64, error)
- func (sf *HandleT) IsEmpty(warehouse warehouseutils.Warehouse) (empty bool, err error)
- func (sf *HandleT) LoadIdentityMappingsTable() (err error)
- func (sf *HandleT) LoadIdentityMergeRulesTable() (err error)
- func (sf *HandleT) LoadTable(tableName string) error
- func (sf *HandleT) LoadTestTable(location, tableName string, _ map[string]interface{}, _ string) (err error)
- func (sf *HandleT) LoadUserTables() map[string]error
- func (sf *HandleT) SetConnectionTimeout(timeout time.Duration)
- func (sf *HandleT) Setup(warehouse warehouseutils.Warehouse, uploader warehouseutils.UploaderI) (err error)
- func (sf *HandleT) TestConnection(warehouse warehouseutils.Warehouse) (err error)
- type OptionalCredsT
- type SnowflakeCredentialsT
Constants ¶
View Source
const ( StorageIntegration = "storageIntegration" SFAccount = "account" SFWarehouse = "warehouse" SFDbName = "database" SFUserName = "user" SFPassword = "password" )
String constants for snowflake destination config
Variables ¶
This section is empty.
Functions ¶
func ColumnsWithDataTypes ¶
Types ¶
type HandleT ¶
type HandleT struct { DB *sql.DB Namespace string CloudProvider string ObjectStorage string Warehouse warehouseutils.Warehouse Uploader warehouseutils.UploaderI ConnectTimeout time.Duration }
func (*HandleT) AddColumns ¶
func (sf *HandleT) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
func (*HandleT) AlterColumn ¶
func (*HandleT) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
func (*HandleT) CrashRecover ¶
func (*HandleT) CrashRecover(_ warehouseutils.Warehouse) (err error)
func (*HandleT) CreateSchema ¶
func (*HandleT) CreateTable ¶
func (*HandleT) DeleteBy ¶
func (sf *HandleT) DeleteBy(tableNames []string, params warehouseutils.DeleteByParams) (err error)
func (*HandleT) DownloadIdentityRules ¶
func (sf *HandleT) DownloadIdentityRules(gzWriter *misc.GZipWriter) (err error)
DownloadIdentityRules gets distinct combinations of anonymous_id, user_id from tables in warehouse
func (*HandleT) ErrorMappings ¶
func (*HandleT) FetchSchema ¶
func (sf *HandleT) FetchSchema(warehouse warehouseutils.Warehouse) (schema, unrecognizedSchema warehouseutils.SchemaT, err error)
FetchSchema queries snowflake and returns the schema associated with provided namespace
func (*HandleT) GetTotalCountInTable ¶
func (*HandleT) IsEmpty ¶
func (sf *HandleT) IsEmpty(warehouse warehouseutils.Warehouse) (empty bool, err error)
func (*HandleT) LoadIdentityMappingsTable ¶
func (*HandleT) LoadIdentityMergeRulesTable ¶
func (*HandleT) LoadTestTable ¶
func (*HandleT) LoadUserTables ¶
func (*HandleT) SetConnectionTimeout ¶
func (*HandleT) Setup ¶
func (sf *HandleT) Setup(warehouse warehouseutils.Warehouse, uploader warehouseutils.UploaderI) (err error)
func (*HandleT) TestConnection ¶
func (sf *HandleT) TestConnection(warehouse warehouseutils.Warehouse) (err error)
type OptionalCredsT ¶
type OptionalCredsT struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.