Documentation ¶
Index ¶
- Constants
- func ColumnsWithDataTypes(columns map[string]string, prefix string) string
- func Connect(cred *databricks.CredentialsT, connectTimeout time.Duration) (dbHandleT *databricks.DBHandleT, err error)
- func GetDatabricksConnectorURL() string
- func GetDatabricksVersion() (databricksBuildVersion string)
- func Init()
- type HandleT
- func (dl *HandleT) AddColumn(name, columnName, columnType string) (err error)
- func (dl *HandleT) AlterColumn(_, _, _ string) (err error)
- func (dl *HandleT) Cleanup()
- func (dl *HandleT) Connect(warehouse warehouseutils.WarehouseT) (client.Client, error)
- func (dl *HandleT) CrashRecover(warehouse warehouseutils.WarehouseT) (err error)
- func (dl *HandleT) CreateSchema() (err error)
- func (dl *HandleT) CreateTable(tableName string, columns map[string]string) (err error)
- func (dl *HandleT) DownloadIdentityRules(*misc.GZipWriter) (err error)
- func (dl *HandleT) DropTable(tableName string) (err error)
- func (dl *HandleT) ExecuteSQL(sqlStatement, queryType string) (err error)
- func (dl *HandleT) ExecuteSQLClient(dbClient *databricks.DBHandleT, sqlStatement string) (err error)
- func (dl *HandleT) FetchSchema(warehouse warehouseutils.WarehouseT) (schema warehouseutils.SchemaT, err error)
- func (dl *HandleT) GetLogIdentifier(args ...string) string
- func (dl *HandleT) GetTotalCountInTable(tableName string) (total int64, err error)
- func (dl *HandleT) IsEmpty(warehouseutils.WarehouseT) (empty bool, err error)
- func (dl *HandleT) LoadIdentityMappingsTable() (err error)
- func (dl *HandleT) LoadIdentityMergeRulesTable() (err error)
- func (dl *HandleT) LoadTable(tableName string) error
- func (dl *HandleT) LoadTestTable(location, tableName string, _ map[string]interface{}, format string) (err error)
- func (dl *HandleT) LoadUserTables() map[string]error
- func (dl *HandleT) SetConnectionTimeout(timeout time.Duration)
- func (dl *HandleT) Setup(warehouse warehouseutils.WarehouseT, uploader warehouseutils.UploaderI) (err error)
- func (dl *HandleT) TestConnection(warehouse warehouseutils.WarehouseT) (err error)
Constants ¶
const ( DLHost = "host" DLPort = "port" DLPath = "path" DLToken = "token" AWSTokens = "useSTSTokens" AWSAccessKey = "accessKey" AWSAccessSecret = "accessKeyID" EnableExternalLocation = "enableExternalLocation" ExternalLocation = "externalLocation" )
Database configuration
Variables ¶
This section is empty.
Functions ¶
func ColumnsWithDataTypes ¶
ColumnsWithDataTypes returns columns with specified prefix and data type
func Connect ¶ added in v1.0.2
func Connect(cred *databricks.CredentialsT, connectTimeout time.Duration) (dbHandleT *databricks.DBHandleT, err error)
Connect creates database connection with CredentialsT
func GetDatabricksConnectorURL ¶
func GetDatabricksConnectorURL() string
GetDatabricksConnectorURL returns databricks connector url.
func GetDatabricksVersion ¶
func GetDatabricksVersion() (databricksBuildVersion string)
GetDatabricksVersion Gets the databricks version by making a grpc call to Version stub.
Types ¶
type HandleT ¶
type HandleT struct { Namespace string ObjectStorage string Warehouse warehouseutils.WarehouseT Uploader warehouseutils.UploaderI ConnectTimeout time.Duration // contains filtered or unexported fields }
func (*HandleT) AlterColumn ¶
AlterColumn alter table with column name and type
func (*HandleT) Connect ¶
func (dl *HandleT) Connect(warehouse warehouseutils.WarehouseT) (client.Client, error)
Connect returns Client
func (*HandleT) CrashRecover ¶
func (dl *HandleT) CrashRecover(warehouse warehouseutils.WarehouseT) (err error)
CrashRecover handle crash recover scenarios
func (*HandleT) CreateSchema ¶
CreateSchema checks if schema exists or not. If it does not exist, it creates the schema.
func (*HandleT) CreateTable ¶
CreateTable creates tables with table name and columns
func (*HandleT) DownloadIdentityRules ¶
func (dl *HandleT) DownloadIdentityRules(*misc.GZipWriter) (err error)
DownloadIdentityRules download identity rules
func (*HandleT) ExecuteSQL ¶
ExecuteSQL executes sql using grpc Client
func (*HandleT) ExecuteSQLClient ¶
func (dl *HandleT) ExecuteSQLClient(dbClient *databricks.DBHandleT, sqlStatement string) (err error)
ExecuteSQLClient executes sql client using grpc Client
func (*HandleT) FetchSchema ¶
func (dl *HandleT) FetchSchema(warehouse warehouseutils.WarehouseT) (schema warehouseutils.SchemaT, err error)
FetchSchema queries delta lake and returns the schema associated with provided namespace
func (*HandleT) GetLogIdentifier ¶
GetLogIdentifier returns log identifier
func (*HandleT) GetTotalCountInTable ¶
GetTotalCountInTable returns total count in tables.
func (*HandleT) IsEmpty ¶
func (dl *HandleT) IsEmpty(warehouseutils.WarehouseT) (empty bool, err error)
IsEmpty checks if the warehouse is empty or not
func (*HandleT) LoadIdentityMappingsTable ¶
LoadIdentityMappingsTable loads identifies mappings table
func (*HandleT) LoadIdentityMergeRulesTable ¶
LoadIdentityMergeRulesTable loads identifies merge rules tables
func (*HandleT) LoadTestTable ¶
func (*HandleT) LoadUserTables ¶
LoadUserTables loads user tables
func (*HandleT) SetConnectionTimeout ¶
func (*HandleT) Setup ¶
func (dl *HandleT) Setup(warehouse warehouseutils.WarehouseT, uploader warehouseutils.UploaderI) (err error)
Setup populate the HandleT
func (*HandleT) TestConnection ¶
func (dl *HandleT) TestConnection(warehouse warehouseutils.WarehouseT) (err error)
TestConnection test the connection for the warehouse