databricks

package module
v0.1.4-0...-9495e81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

databricks-sdk-golang

This is a Golang SDK for DataBricks REST API 2.0 and Azure DataBricks REST API 2.0.

WARNING: The SDK is unstable and under development. More testing needed!

Usage

import (
  databricks "github.com/xinsnake/databricks-sdk-golang"
  dbAzure "github.com/xinsnake/databricks-sdk-golang/azure"
  // dbAws "github.com/xinsnake/databricks-sdk-golang/aws"
)

var o databricks.DBClientOption
o.Host = os.Getenv("DATABRICKS_HOST")
o.Token = os.Getenv("DATABRICKS_TOKEN")

var c dbAzure.DBClient
c.Init(o)

jobs, err := c.Jobs().List()

Implementation Progress

Everything except SCIM API are implemented. Please refer to the progress below:

API AWS Azure
Clusters API
DBFS API
Groups API
Instance Pools API (preview)
Instance Profiles API N/A
Jobs API
Libraries API
MLflow API
SCIM API (preview)
Secrets API
Token API
Workspace API

Notes

  • Deepcopy is generated shall you need it.

Documentation

Overview

+k8s:deepcopy-gen=package

Index

Constants

View Source
const (
	// APIVersion is the version of the RESTful API of DataBricks
	APIVersion = "2.0"
	// SdkVersion is the version of this library
	SdkVersion = "0.1.3"
)

Variables

This section is empty.

Functions

func PerformQuery

func PerformQuery(option DBClientOption, method, path string, data interface{}, headers map[string]string) ([]byte, error)

PerformQuery can be used in a client or directly

Types

type DBClientOption

type DBClientOption struct {
	User               string
	Password           string
	Host               string
	Token              string
	DefaultHeaders     map[string]string
	InsecureSkipVerify bool
	TimeoutSeconds     int
	// contains filtered or unexported fields
}

DBClientOption is used to configure the DataBricks Client

func (*DBClientOption) DeepCopy

func (in *DBClientOption) DeepCopy() *DBClientOption

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBClientOption.

func (*DBClientOption) DeepCopyInto

func (in *DBClientOption) DeepCopyInto(out *DBClientOption)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DBClientOption) Init

func (o *DBClientOption) Init()

Init initializes the client

Directories

Path Synopsis
aws
+k8s:deepcopy-gen=package
+k8s:deepcopy-gen=package
models
+k8s:deepcopy-gen=package
+k8s:deepcopy-gen=package
+k8s:deepcopy-gen=package
+k8s:deepcopy-gen=package
models
+k8s:deepcopy-gen=package
+k8s:deepcopy-gen=package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL