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