yaml

package
v0.35.3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 17 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 ConditionalField added in v0.33.0

type ConditionalField struct {
	Names     []string
	Condition string `yaml:"if"`
}

type Dimension

type Dimension struct {
	Name        string
	Label       string
	Property    string `yaml:"property,omitempty"`
	Column      string
	Description string
	Ignore      bool `yaml:"ignore,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"`
	FirstDayOfWeek     uint32   `yaml:"first_day_of_week"`
	FirstMonthOfYear   uint32   `yaml:"first_month_of_year"`
	Dimensions         []*Dimension
	Measures           []*Measure
	Security           *Security `yaml:"security,omitempty"`
}

type Security added in v0.33.0

type Security struct {
	Access    string              `yaml:"access,omitempty"`
	RowFilter string              `yaml:"row_filter,omitempty"`
	Include   []*ConditionalField `yaml:"include,omitempty"`
	Exclude   []*ConditionalField `yaml:"exclude,omitempty"`
}

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"`
	BatchSize                   string         `yaml:"batch_size,omitempty" mapstructure:"batch_size,omitempty"`
	HivePartition               *bool          `yaml:"hive_partitioning,omitempty" mapstructure:"hive_partitioning,omitempty"`
	Timeout                     int32          `yaml:"timeout,omitempty"`
	Format                      string         `yaml:"format,omitempty" mapstructure:"format,omitempty"`
	Extract                     map[string]any `yaml:"extract,omitempty" mapstructure:"extract,omitempty"`
	DuckDBProps                 map[string]any `yaml:"duckdb,omitempty" mapstructure:"duckdb,omitempty"`
	Headers                     map[string]any `yaml:"headers,omitempty" mapstructure:"headers,omitempty"`
	AllowSchemaRelaxation       *bool          `yaml:"allow_schema_relaxation,omitempty" mapstructure:"allow_schema_relaxation,omitempty"`
	IngestAllowSchemaRelaxation *bool          `yaml:"ingest.allow_schema_relaxation,omitempty" mapstructure:"ingest.allow_schema_relaxation,omitempty"`
	SQL                         string         `yaml:"sql,omitempty" mapstructure:"sql,omitempty"`
	DB                          string         `yaml:"db,omitempty" mapstructure:"db,omitempty"`
	ProjectID                   string         `yaml:"project_id,omitempty" mapstructure:"project_id,omitempty"`
	AccountName                 string         `yaml:"account,omitempty" mapstructure:"account,omitempty"`
	PostgresDatabaseURL         string         `yaml:"database_url,omitempty" mapstructure:"database_url,omitempty"`
	AthenaOutputLocation        string         `yaml:"output_location,omitempty" mapstructure:"output_location,omitempty"`
	AthenaWorkgroup             string         `yaml:"workgroup,omitempty" mapstructure:"workgroup,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