keboola

package
v0.0.0-...-7e33acd Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsStringArray

func AsStringArray(source []interface{}) []string

AsStringArray converts an array of interfaces to an array of strings Terraform stores array data within the ResourceData as []interface{}

func Provider

func Provider() terraform.ResourceProvider

Provider returns a terraform.ResourceProvider for the Keboola provider.

Types

type AccessToken

type AccessToken struct {
	ID                    string                 `json:"id,omitempty"`
	Description           string                 `json:"description"`
	CreatedAt             KBCTime                `json:"created"`
	CanManageBuckets      bool                   `json:"canManageBuckets"`
	CanManageTokens       bool                   `json:"canManageTokens"`
	CanReadAllFileUploads bool                   `json:"canReadAllFileUploads"`
	ExpiresIn             KBCTime                `json:"expires"`
	ComponentAccess       []string               `json:"componentAccess"`
	BucketPermissions     map[string]interface{} `json:"bucketPermissions"`
}

type CSVImportExtractor

type CSVImportExtractor struct {
	ID            string            `json:"id"`
	Name          string            `json:"name"`
	Description   string            `json:"description"`
	Configuration CSVUploadSettings `json:"configuration"`
}

type CSVUploadSettings

type CSVUploadSettings struct {
	Destination string   `json:"destination"`
	Incremental bool     `json:"incremental"`
	PrimaryKey  []string `json:"primaryKey"`
	Delimiter   string   `json:"delimiter"`
	Enclosure   string   `json:"enclosure"`
}

type Configuration

type Configuration struct {
	Input       []Input         `json:"input,omitempty"`
	Output      []Output        `json:"output,omitempty"`
	Queries     []string        `json:"queries,omitempty"`
	ID          string          `json:"id,omitempty"`
	Name        string          `json:"name"`
	Description string          `json:"description"`
	Disabled    bool            `json:"disabled,omitempty"`
	BackEnd     string          `json:"backend"`
	Phase       KBCNumberString `json:"phase"`
	Type        string          `json:"type"`
}

Configuration holds the core configuration for each transformation, as it is structured in the Keboola Storage API.

type CreateGoodDataProject

type CreateGoodDataProject struct {
	WriterID    string `json:"writerId"`
	Description string `json:"description"`
	AuthToken   string `json:"authToken"`
}

type CreateResourceResult

type CreateResourceResult struct {
	ID json.Number `json:"id,omitempty"`
}

CreateResourceResult holds the results from requesting creation of a Keboola resource.

type DateDimension

type DateDimension struct {
	Identifier  string `json:"identifier,omitempty"`
	IncludeTime bool   `json:"includeTime"`
	Template    string `json:"template"`
}

type FTPExtractor

type FTPExtractor struct {
	ID            string      `json:"id"`
	Name          string      `json:"name"`
	Description   string      `json:"description"`
	Configuration FTPSettings `json:"configuration"`
	Files         []FTPFile   `json:"rows"`
}

type FTPFile

type FTPFile struct {
	ID            string                 `json:"id"`
	Name          string                 `json:"name"`
	Description   string                 `json:"description"`
	Configuration map[string]interface{} `json:"configuration"`
}

type FTPSettings

type FTPSettings struct {
	Host                string `json:"host"`
	Port                int    `json:"port"`
	ConnectionType      string `json:"connectionType"`
	Username            string `json:"username"`
	EncryptedPassword   string `json:"#password"`
	EncryptedPrivateKey string `json:"#privateKey"`
}

type GoodDataColumn

type GoodDataColumn struct {
	Name            string `json:"name"`
	DataType        string `json:"dataType"`
	DataTypeSize    string `json:"dataTypeSize"`
	SchemaReference string `json:"schemaReference"`
	Reference       string `json:"reference"`
	SortOrder       string `json:"sortOrder"`
	SortLabel       string `json:"sortLabel"`
	Format          string `json:"format"`
	DateDimension   string `json:"dateDimension"`
	Title           string `json:"title"`
	Type            string `json:"type"`
}

type GoodDataProject

type GoodDataProject struct {
	ProjectId string `json:"pid"`
}

type GoodDataStorage

type GoodDataStorage struct {
	Input GoodDataStorageInput `json:"input,omitempty"`
}

type GoodDataStorageInput

type GoodDataStorageInput struct {
	Tables []GoodDataStorageTable `json:"tables,omitempty"`
}

type GoodDataStorageTable

type GoodDataStorageTable struct {
	ChangedSince string   `json:"changed_since"`
	Columns      []string `json:"columns"`
	Source       string   `json:"source"`
}

type GoodDataTable

type GoodDataTable struct {
	ID              string                    `json:"tableId,omitempty"`
	Title           string                    `json:"title"`
	Export          bool                      `json:"export"`
	Identifier      string                    `json:"identifier"`
	IncrementalDays KBCBooleanNumber          `json:"incrementalLoad"`
	Columns         map[string]GoodDataColumn `json:"columns"`
}

type GoodDataTableV3

type GoodDataTableV3 struct {
	ID              string                    `json:"tableId,omitempty"`
	Title           string                    `json:"title"`
	Identifier      string                    `json:"identifier"`
	IncrementalDays KBCBooleanNumber          `json:"incrementalLoad,omitempty"`
	Columns         map[string]GoodDataColumn `json:"columns"`
}

type GoodDataUser

type GoodDataUser struct {
	Login    string `json:"login"`
	Password string `json:"#password"`
}

type GoodDataUserManagement

type GoodDataUserManagement struct {
	ID            string                              `json:"id,omitempty"`
	Name          string                              `json:"name"`
	Description   string                              `json:"description,omitempty"`
	Configuration GoodDataUserManagementConfiguration `json:"configuration"`
}

type GoodDataUserManagementComponentV2

type GoodDataUserManagementComponentV2 struct {
	Name          string                                `json:"name"`
	Description   string                                `json:"description"`
	Configuration GoodDataUserManagementConfigurationV2 `json:"configuration"`
}

type GoodDataUserManagementConfiguration

type GoodDataUserManagementConfiguration struct {
	Storage    GoodDataUserManagementStorage    `json:"storage"`
	Parameters GoodDataUserManagementParameters `json:"parameters"`
}

type GoodDataUserManagementConfigurationV2

type GoodDataUserManagementConfigurationV2 struct {
	Storage    GoodDataUserManagementStorageV2    `json:"storage"`
	Parameters GoodDataUserManagementParametersV2 `json:"parameters"`
}

type GoodDataUserManagementInput

type GoodDataUserManagementInput struct {
	Tables []Input `json:"tables,omitempty"`
}

type GoodDataUserManagementInputTableV2

type GoodDataUserManagementInputTableV2 struct {
	Columns       []string `json:"columns"`
	Source        string   `json:"source"`
	Destination   string   `json:"destination"`
	WhereColumn   string   `json:"where_column"`
	WhereOperator string   `json:"where_operator"`
	WhereValues   []string `json:"where_values"`
}

type GoodDataUserManagementOutput

type GoodDataUserManagementOutput struct {
	Tables []Output `json:"tables,omitempty"`
}

type GoodDataUserManagementParameters

type GoodDataUserManagementParameters struct {
	Writer string `json:"gd_writer"`
}

type GoodDataUserManagementParametersV2

type GoodDataUserManagementParametersV2 struct {
	Password     string `json:"#password"`
	ProjectId    string `json:"pid"`
	Username     string `json:"username"`
	CustomDomain string `json:"domain_custom"`
}

type GoodDataUserManagementStorage

type GoodDataUserManagementStorage struct {
	Input  GoodDataUserManagementInput  `json:"input"`
	Output GoodDataUserManagementOutput `json:"output"`
}

type GoodDataUserManagementStorageInputV2

type GoodDataUserManagementStorageInputV2 struct {
	Tables []GoodDataUserManagementInputTableV2 `json:"tables"`
}

type GoodDataUserManagementStorageV2

type GoodDataUserManagementStorageV2 struct {
	Input GoodDataUserManagementStorageInputV2 `json:"input"`
}

type GoodDataWriter

type GoodDataWriter struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type GoodDataWriterComponent

type GoodDataWriterComponent struct {
	Name          string                      `json:"name"`
	Description   string                      `json:"description"`
	Configuration GoodDataWriterConfiguration `json:"configuration"`
}

type GoodDataWriterConfiguration

type GoodDataWriterConfiguration struct {
	Parameters GoodDataWriterParameters `json:"parameters"`
	Storage    GoodDataStorage          `json:"storage,omitempty"`
}

type GoodDataWriterParameters

type GoodDataWriterParameters struct {
	DateDimensions map[string]DateDimension   `json:"dimensions,omitempty"`
	Tables         map[string]GoodDataTableV3 `json:"tables,omitempty"`
	LoadOnly       bool                       `json:"loadOnly"`
	MultiLoad      bool                       `json:"multiLoad"`
	Project        GoodDataProject            `json:"project"`
	User           GoodDataUser               `json:"user"`
}

type Input

type Input struct {
	Source        string                 `json:"source"`
	Destination   string                 `json:"destination"`
	WhereColumn   string                 `json:"whereColumn,omitempty"`
	WhereOperator string                 `json:"whereOperator,omitempty"`
	WhereValues   []string               `json:"whereValues,omitempty"`
	Indexes       [][]string             `json:"indexes,omitempty"`
	Columns       []string               `json:"columns,omitempty"`
	DataTypes     map[string]interface{} `json:"datatypes,omitempty"`
	Days          int                    `json:"days,omitempty"`
	ChangedSince  string                 `json:"changedSince,omitempty"`
	LoadType      string                 `json:"loadType,omitempty"`
}

Input is a mapping from input tables to internal tables for use by the transformation queries.

type KBCBoolean

type KBCBoolean bool

KBCBoolean represents a boolean value in the Keboola APIs, which can take a 0/1 or false/true value.

func (*KBCBoolean) UnmarshalJSON

func (bit *KBCBoolean) UnmarshalJSON(data []byte) error

UnmarshalJSON handles unmarshaling a KBCBoolean in to JSON.

type KBCBooleanNumber

type KBCBooleanNumber int

KBCBooleanNumber represents a dual value in the Keboola APIs, which can take either a boolean, or a number/integer.

func (*KBCBooleanNumber) UnmarshalJSON

func (kbn *KBCBooleanNumber) UnmarshalJSON(data []byte) error

UnmarshalJSON handles unmarshaling a KBCNumberString in to JSON.

type KBCClient

type KBCClient struct {
	APIKey string
}

KBCClient is used for communicating with the Keboola Connection API

func (*KBCClient) DeleteFromStorage

func (c *KBCClient) DeleteFromStorage(endpoint string) (*http.Response, error)

DeleteFromStorage removes an existing object from the Keboola Storage API.

func (*KBCClient) DeleteFromSyrup

func (c *KBCClient) DeleteFromSyrup(endpoint string) (*http.Response, error)

DeleteFromSyrup removes an existing object from the Keboola Syrup API.

func (*KBCClient) GetFromStorage

func (c *KBCClient) GetFromStorage(endpoint string) (*http.Response, error)

GetFromStorage requests an object from the Keboola Storage API.

func (*KBCClient) GetFromSyrup

func (c *KBCClient) GetFromSyrup(endpoint string) (*http.Response, error)

GetFromSyrup requests an object from the Keboola Syrup API.

func (*KBCClient) PatchOnSyrup

func (c *KBCClient) PatchOnSyrup(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

PatchOnSyrup applies a patch/changeset to an existing object on the Keboola Storage API.

func (*KBCClient) PostToFileImport

func (c *KBCClient) PostToFileImport(endpoint string, formdata *bytes.Buffer) (*http.Response, error)

PostToFileImport posts a new object to the Keboola File Import API.

func (*KBCClient) PostToStorage

func (c *KBCClient) PostToStorage(endpoint string, formdata *bytes.Buffer) (*http.Response, error)

PostToStorage posts a new object to the Keboola Storage API.

func (*KBCClient) PostToSyrup

func (c *KBCClient) PostToSyrup(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

PostToSyrup posts a new object to the Keboola Syrup API.

func (*KBCClient) PutFormToSyrup

func (c *KBCClient) PutFormToSyrup(endpoint string, formdata *bytes.Buffer) (*http.Response, error)

PutFormToSyrup puts an existing object in Form encoded format to the Keboola Storage API for update.

func (*KBCClient) PutToStorage

func (c *KBCClient) PutToStorage(endpoint string, formData *bytes.Buffer) (*http.Response, error)

PutToStorage puts an existing object to the Keboola Storage API for update.

func (*KBCClient) PutToSyrup

func (c *KBCClient) PutToSyrup(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

PutToSyrup puts an existing object to the Keboola Syrup API for update.

type KBCNumberString

type KBCNumberString string

KBCNumberString represents a dual value in the Keboola APIs, which can take either a string, or a number/integer.

func (*KBCNumberString) UnmarshalJSON

func (kns *KBCNumberString) UnmarshalJSON(data []byte) error

UnmarshalJSON handles unmarshaling a KBCNumberString in to JSON.

type KBCTime

type KBCTime struct {
	time.Time
}

KBCTime represents a time value in the Keboola APIs, which has a very specific formatting.

func (*KBCTime) UnmarshalJSON

func (kt *KBCTime) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON handles unmarshaling a KBCTime in to JSON.

type Orchestration

type Orchestration struct {
	ID            json.Number                 `json:"id,omitempty"`
	Name          string                      `json:"name"`
	Active        bool                        `json:"active"`
	ScheduleCRON  string                      `json:"crontabRecord"`
	Token         OrchestrationToken          `json:"token,omitempty"`
	Notifications []OrchestrationNotification `json:"notifications"`
}

type OrchestrationNotification

type OrchestrationNotification struct {
	Email      string                 `json:"email"`
	Channel    string                 `json:"channel"`
	Parameters map[string]interface{} `json:"parameters"`
}

type OrchestrationTask

type OrchestrationTask struct {
	ID                json.Number            `json:"id"`
	Component         string                 `json:"component"`
	Action            string                 `json:"action"`
	ActionParameters  map[string]interface{} `json:"actionParameters"`
	Timeout           int                    `json:"timeoutMinutes"`
	IsActive          bool                   `json:"active"`
	ContinueOnFailure bool                   `json:"continueOnFailure"`
	Phase             string                 `json:"phase"`
}

type OrchestrationToken

type OrchestrationToken struct {
	ID          string `json:"id"`
	Description string `json:"description"`
}

type Output

type Output struct {
	Source              string   `json:"source"`
	Destination         string   `json:"destination"`
	Incremental         bool     `json:"incremental,omitempty"`
	PrimaryKey          []string `json:"primaryKey,omitempty"`
	DeleteWhereValues   []string `json:"deleteWhereValues,omitempty"`
	DeleteWhereOperator string   `json:"deleteWhereOperator,omitempty"`
	DeleteWhereColumn   string   `json:"deleteWhereColumn,omitempty"`
}

Output is a mapping from the internal tables used by transformation queries to output tables.

type PostgreSQLWriter

type PostgreSQLWriter struct {
	ID            string                        `json:"id,omitempty"`
	Name          string                        `json:"name"`
	Description   string                        `json:"description"`
	Configuration PostgreSQLWriterConfiguration `json:"configuration"`
}

type PostgreSQLWriterConfiguration

type PostgreSQLWriterConfiguration struct {
	Parameters PostgreSQLWriterParameters `json:"parameters,omitempty"`
	Storage    PostgreSQLWriterStorage    `json:"storage,omitempty"`
}

type PostgreSQLWriterDatabaseParameters

type PostgreSQLWriterDatabaseParameters struct {
	HostName          string `json:"host"`
	Database          string `json:"database"`
	EncryptedPassword string `json:"#password"`
	Username          string `json:"user"`
	Schema            string `json:"schema"`
	Port              string `json:"port"`
	Driver            string `json:"driver"`
}

type PostgreSQLWriterParameters

type PostgreSQLWriterParameters struct {
	Database PostgreSQLWriterDatabaseParameters `json:"db"`
	Tables   []PostgreSQLWriterTable            `json:"tables,omitempty"`
}

type PostgreSQLWriterStorage

type PostgreSQLWriterStorage struct {
	Input struct {
		Tables []PostgreSQLWriterStorageTable `json:"tables,omitempty"`
	} `json:"input"`
}

type PostgreSQLWriterStorageTable

type PostgreSQLWriterStorageTable struct {
	Source      string   `json:"source"`
	Destination string   `json:"destination"`
	Columns     []string `json:"columns"`
}

type PostgreSQLWriterTable

type PostgreSQLWriterTable struct {
	DatabaseName string                      `json:"dbName"`
	Export       bool                        `json:"export"`
	Incremental  bool                        `json:"incremental"`
	TableID      string                      `json:"tableId"`
	PrimaryKey   []string                    `json:"primaryKey,omitempty"`
	Items        []PostgreSQLWriterTableItem `json:"items"`
}

type PostgreSQLWriterTableItem

type PostgreSQLWriterTableItem struct {
	Name         string `json:"name"`
	DatabaseName string `json:"dbName"`
	Type         string `json:"type"`
	Size         string `json:"size"`
	IsNullable   bool   `json:"nullable"`
	DefaultValue string `json:"default"`
}

type ProvisionSnowflakeResponse

type ProvisionSnowflakeResponse struct {
	Status      string `json:"status"`
	Credentials struct {
		ID          string `json:"id"`
		HostName    string `json:"hostname"`
		Port        int    `json:"port"`
		Database    string `json:"db"`
		Schema      string `json:"schema"`
		Warehouse   string `json:"warehouse"`
		Username    string `json:"user"`
		Password    string `json:"password"`
		WorkspaceID string `json:"workspaceId"`
	} `json:"credentials"`
}

type SnowflakeDatabaseParameters

type SnowflakeDatabaseParameters struct {
	HostName          string `json:"host"`
	Database          string `json:"database"`
	Password          string `json:"password,omitempty"`
	EncryptedPassword string `json:"#password,omitempty"`
	Username          string `json:"user"`
	Schema            string `json:"schema"`
	Port              string `json:"port"`
	Driver            string `json:"driver,omitempty"`
	Warehouse         string `json:"warehouse"`
}

type SnowflakeExtractor

type SnowflakeExtractor struct {
	ID            string                          `json:"id,omitempty"`
	Name          string                          `json:"name"`
	Description   string                          `json:"description"`
	Configuration SnowflakeExtractorConfiguration `json:"configuration"`
}

type SnowflakeExtractorConfiguration

type SnowflakeExtractorConfiguration struct {
	Parameters SnowflakeExtractorParameters `json:"parameters,omitempty"`
}

type SnowflakeExtractorInputTable

type SnowflakeExtractorInputTable struct {
	Schema    string `json:"schema"`
	TableName string `json:"tableName"`
}

type SnowflakeExtractorParameters

type SnowflakeExtractorParameters struct {
	Database SnowflakeDatabaseParameters `json:"db"`
	Tables   []SnowflakeExtractorTable   `json:"tables,omitempty"`
}

type SnowflakeExtractorTable

type SnowflakeExtractorTable struct {
	ID          int                           `json:"id"`
	Name        string                        `json:"name"`
	Enabled     bool                          `json:"enabled,omitempty"`
	Incremental bool                          `json:"incremental"`
	OutputTable string                        `json:"outputTable"`
	InputTable  *SnowflakeExtractorInputTable `json:"table,omitempty"`
	PrimaryKey  []string                      `json:"primaryKey,omitempty"`
	Query       string                        `json:"query,omitempty"`
	Columns     []string                      `json:"columns,omitempty"`
}

type SnowflakeWriter

type SnowflakeWriter struct {
	ID            string                       `json:"id,omitempty"`
	Name          string                       `json:"name"`
	Description   string                       `json:"description"`
	Configuration SnowflakeWriterConfiguration `json:"configuration"`
}

SnowflakeWriter is the data model for Snowflake Writers within the Keboola Storage API.

type SnowflakeWriterConfiguration

type SnowflakeWriterConfiguration struct {
	Parameters SnowflakeWriterParameters `json:"parameters"`
	Storage    SnowflakeWriterStorage    `json:"storage,omitempty"`
}

type SnowflakeWriterDatabaseParameters

type SnowflakeWriterDatabaseParameters struct {
	HostName          string `json:"host"`
	Database          string `json:"database"`
	Password          string `json:"password,omitempty"`
	EncryptedPassword string `json:"#password,omitempty"`
	Username          string `json:"user"`
	Schema            string `json:"schema"`
	Port              string `json:"port"`
	Driver            string `json:"driver"`
	Warehouse         string `json:"warehouse"`
}

type SnowflakeWriterParameters

type SnowflakeWriterParameters struct {
	Database SnowflakeDatabaseParameters `json:"db"`
	Tables   []SnowflakeWriterTable      `json:"tables,omitempty"`
}

type SnowflakeWriterStorage

type SnowflakeWriterStorage struct {
	Input struct {
		Tables []SnowflakeWriterStorageTable `json:"tables,omitempty"`
	} `json:"input,omitempty"`
}

type SnowflakeWriterStorageTable

type SnowflakeWriterStorageTable struct {
	Source        string   `json:"source"`
	Destination   string   `json:"destination"`
	Columns       []string `json:"columns"`
	ChangedSince  string   `json:"changed_since,omitempty"`
	WhereColumn   string   `json:"where_column,omitempty"`
	WhereOperator string   `json:"where_operator,omitempty"`
	WhereValues   []string `json:"where_values,omitempty"`
}

type SnowflakeWriterTable

type SnowflakeWriterTable struct {
	DatabaseName string                     `json:"dbName"`
	Export       bool                       `json:"export"`
	Incremental  bool                       `json:"incremental"`
	TableID      string                     `json:"tableId"`
	PrimaryKey   []string                   `json:"primaryKey,omitempty"`
	Items        []SnowflakeWriterTableItem `json:"items"`
}

type SnowflakeWriterTableItem

type SnowflakeWriterTableItem struct {
	Name         string `json:"name"`
	DatabaseName string `json:"dbName"`
	Type         string `json:"type"`
	Size         string `json:"size"`
	IsNullable   bool   `json:"nullable"`
	DefaultValue string `json:"default"`
}

type StorageBucket

type StorageBucket struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name"`
	Stage       string `json:"stage"`
	Description string `json:"description"`
	Backend     string `json:"backend,omitempty"`
}

StorageBucket is the data model for storage buckets within the Keboola Storage API.

type StorageJobStatus

type StorageJobStatus struct {
	ID      int    `json:"id"`
	URL     string `json:"url"`
	Status  string `json:"status"`
	Results struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"results"`
}

StorageJobStatus contains the job status and results for Storage API based jobs.

type StorageTable

type StorageTable struct {
	ID             string   `json:"id,omitempty"`
	Name           string   `json:"name"`
	Delimiter      string   `json:"delimiter"`
	Enclosure      string   `json:"enclosure,omitempty"`
	Transactional  bool     `json:"transactional,omitempty"`
	Columns        []string `json:"columns"`
	PrimaryKey     []string `json:"primaryKey"`
	IndexedColumns []string `json:"indexedColumns"`
}

StorageTable is the data model for Storage Tables within the Keboola Storage API.

type SyrupJobStatus

type SyrupJobStatus struct {
	ID     int    `json:"id"`
	URL    string `json:"url"`
	Status string `json:"status"`
}

SyrupJobStatus contains the job status and results for Syrup API based jobs.

type Transformation

type Transformation struct {
	ID            string        `json:"id"`
	Configuration Configuration `json:"configuration"`
}

Transformation is the data model for data transformations within the Keboola Storage API.

type TransformationBucket

type TransformationBucket struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description"`
}

TransformationBucket is the data model for data transformations within the Keboola Storage API.

type UploadFileResult

type UploadFileResult struct {
	ID int `json:"id"`
}

UploadFileResult contains the id of the CSV file uploaded to AWS S3.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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