yaml

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package yaml reads and writes artifacts that exactly mirror the internal representation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupported = errors.New("yaml only supported for sources and dashboards")

Functions

This section is empty.

Types

type Dimension

type Dimension struct {
	Name        string
	Label       string
	Property    string `yaml:"property,omitempty"`
	Column      string
	Description string
	Ignore      bool `yaml:"ignore,omitempty"`
}

type ExtractConfig added in v0.21.0

type ExtractConfig struct {
	Strategy string `yaml:"strategy,omitempty" mapstructure:"strategy,omitempty"`
	Size     string `yaml:"size,omitempty" mapstructure:"size,omitempty"`
}

type ExtractPolicy added in v0.21.0

type ExtractPolicy struct {
	Row  *ExtractConfig `yaml:"rows,omitempty" mapstructure:"rows,omitempty"`
	File *ExtractConfig `yaml:"files,omitempty" mapstructure:"files,omitempty"`
}

type Measure

type Measure struct {
	Label               string
	Name                string
	Expression          string
	Description         string
	Format              string `yaml:"format_preset"`
	Ignore              bool   `yaml:"ignore,omitempty"`
	ValidPercentOfTotal bool   `yaml:"valid_percent_of_total,omitempty"`
}

type MetricsView

type MetricsView struct {
	Label              string `yaml:"title"`
	DisplayName        string `yaml:"display_name,omitempty"` // for backwards compatibility
	Description        string
	Model              string
	TimeDimension      string   `yaml:"timeseries"`
	SmallestTimeGrain  string   `yaml:"smallest_time_grain"`
	DefaultTimeRange   string   `yaml:"default_time_range"`
	AvailableTimeZones []string `yaml:"available_time_zones,omitempty"`
	Dimensions         []*Dimension
	Measures           []*Measure
}

type Source

type Source struct {
	Type                  string
	Path                  string         `yaml:"path,omitempty"`
	CsvDelimiter          string         `yaml:"csv.delimiter,omitempty" mapstructure:"csv.delimiter,omitempty"`
	URI                   string         `yaml:"uri,omitempty"`
	Region                string         `yaml:"region,omitempty" mapstructure:"region,omitempty"`
	S3Endpoint            string         `yaml:"endpoint,omitempty" mapstructure:"endpoint,omitempty"`
	GlobMaxTotalSize      int64          `yaml:"glob.max_total_size,omitempty" mapstructure:"glob.max_total_size,omitempty"`
	GlobMaxObjectsMatched int            `yaml:"glob.max_objects_matched,omitempty" mapstructure:"glob.max_objects_matched,omitempty"`
	GlobMaxObjectsListed  int64          `yaml:"glob.max_objects_listed,omitempty" mapstructure:"glob.max_objects_listed,omitempty"`
	GlobPageSize          int            `yaml:"glob.page_size,omitempty" mapstructure:"glob.page_size,omitempty"`
	HivePartition         *bool          `yaml:"hive_partitioning,omitempty" mapstructure:"hive_partitioning,omitempty"`
	Timeout               int32          `yaml:"timeout,omitempty"`
	ExtractPolicy         *ExtractPolicy `yaml:"extract,omitempty"`
	Format                string         `yaml:"format,omitempty" mapstructure:"format,omitempty"`
	DuckDBProps           map[string]any `yaml:"duckdb,omitempty" mapstructure:"duckdb,omitempty"`
	Headers               map[string]any `yaml:"headers,omitempty" mapstructure:"headers,omitempty"`
	AllowSchemaRelaxation *bool          `yaml:"ingest.allow_schema_relaxation,omitempty" mapstructure:"allow_schema_relaxation,omitempty"`
	Query                 string         `yaml:"query,omitempty" mapstructure:"query,omitempty"`
	DB                    string         `yaml:"db,omitempty" mapstructure:"db,omitempty"`
}

*

  • This file contains the mapping from CatalogObject to Yaml files

Jump to

Keyboard shortcuts

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