Schema URL

Type: object

Properties

workspace Workspace | null

A workspace definition

profile Profile | null

A profile definition

catalog Catalog | null

A catalog definition

schema Schema | null

A schema definition

table Table | null

A table definition

policy Policy | null

A policy definition

classifier Classifier | null

A classifier definition

function Function | null

A function definition

Definitions

Workspace object

A workspace is a collection of one or more catalogs, schemas, tables, and resources, called workspace members, that are managed together.

edition string required

The SDF edition, should always be 1 (for now)

name string | null

The name of this workspace (defaults to the workspace directory name if not given) Name must be set for deployment.

description string | null

A description of this workspace

repository string | null

The URL of the workspace source repository [defaults to 'none' if no repository is given]

remote-location string | null

The default output object store location, e.g. 's3://bucket/key/' where key is optional

includes array | null

An array of directories and filenames containing .sql and .sdf.yml files

excludes array | null

An array of directories and filenames to be skipped when resolving includes

references array | null

An array of paths to other workspaces, i.e. .sql and .yml files

default-dialect Dialect | null

The default dialect of this workspace. If not set, defaults to sdf dialect

resources array | null

An array of paths to directories and files, which will be copied to the SDF service on deployment

default-catalog string | null

Defines a default catalog [If not set, defaults to the directory of the workspace]

default-schema string | null

Defines a default schema [If not set, defaults to 'pub']

default-profile string | null

Defines the default profile [if not set, defaults to 'dbg']

defined-by FilePath | null

[Derived] Workspace is defined by this file

variables array | null

An array of named values for setting SQL variables from your enviromnent Ex. -dt: dt, used in SQL as @dt

FilePath object

All file path should either be relative to the workspace, or absolute for an object store like AWS s3://

path string required

A filepath

time SystemTime | null

Last modified of the file

SystemTime object
secs_since_epoch integer required
format=uint64min=0.0
nanos_since_epoch integer required
format=uint32min=0.0
WorkspacePath object
path string required

The relative path from this workspace to the referenced workspace, for a Git repo, from the root of the depot to the workspace

git string required

The Git repo

rev string required

the Git revision

branch string required

the Git branch

Dialect string | string | string | string | string | string | string
Variable object

SQL queries can be parameterized via variables of type varchar. A variable definition binds the variable to the provided value.

name string required

The name of the variable

description string | null
value string | null

The value of this variable (using sql/yaml literals)

Profile object

Profiles provide a way to alter the inclusion/exclusion of paths, resources and default dialect.

name string required
description string | null
includes array | null

An array of directories and filenames containing .sql and .sdf.yml files

excludes array | null

An array of directories and filenames to be skipped when resolving includes

remote-location string | null

The default output object store location, e.g. 's3://bucket/dir/' where dir is optional

defined-by FilePath | null
Catalog object

Catalogs are named collections of schemas in an SQL-environment, and are defined via their includes/excludes and dialect

name string required
description string | null
includes array | null

An array of directories and filenames containing .sql and .sdf.yml files

excludes array | null

An array of directories and filenames to be skipped when resolving includes

dialect Dialect | null

The default dialect, defaults to sdf if not set

defined-by FilePath | null

[Derived] Catalog is defined by this file

Schema object

Schemas are named collections of tables in an SQL-environment, and are defined via their includes/excludes and dialect

name string required
description string | null
includes array | null

An array of directories and filenames containing .sql and .sdf.yml files

excludes array | null

An array of directories and filenames to be skipped when resolving includes

dialect Dialect | null

The dialect, defaults to sdf if not set

defined-by FilePath | null

[Derived] Schema is defined by this file

Table object

A tables is either defined by given data (also called external table) or defined via a query.

name string required
description string | null
includes array | null

An array of sql file names [Typically inferred]

dialect Dialect | null

The dialect of this table, defaults to sdf

columns array | null

The columns of the schema: name, type, metadata

partitioned-by array | null

The partitioning format of the table

schedule string | null

The schedule of the table [expressed as cron]

starting string | null

The first date of the table [expressed by prefixes of RFC 33]

classifiers array | null

An array of classifier references

lineage Lineage | null

Lineage, a tagged array of column references

materialization Materialization | null

The materialization scheme of this table

insert-into string | null

Store data under this catalog.schema.table instead of the original name

location string | null

Data is at this location

file-format FileFormat | null

Store table in this format [only for external tables]

with-header boolean | null

CSV data has a header [only for external tables]

delimiter string | null

CSV data is separated by this delimiter [only for external tables]

compression CompressionType | null

Json or CSV data is compressed with this method [only for external tables]

defined-by FilePath | null

[Derived] Table is defined by this file

Column object
name string required

The name of the column

description string | null

A description of this column

datatype string | null

The type of this column

nullable boolean | null

The type of this column

classifiers array | null

An array of classifier references

lineage Lineage | null

Lineage, a tagged array of column references

Lineage object
copy array | null

The output column is computed by copying these upstream columns

modify array | null

The output column is computed by transforming these upstream columns

scan array | null

These upstream columns are indirectly used to produce the output (e.g. in WHERE or GROUP BY)

Partition object

A partition is a table column, used to describe to which partition this row belongs to

name string required

The name of the partition column

description string | null

A description of the partition column

format string | null

The format of the partition column [use strftime format for date/time] See (guide)[https://docs.sdf.com/guide/schedules]

Materialization string | string | string | string | string
FileFormat string

Store table data in these formats

CompressionType string | string | string | string

Compress table data using these methods

Policy object

A policy is a an deny or allow expression that controls access to table.

name string required

The name of the policy

description string | null

A description of this policy

deny Deny | null

Deny data access based on this policy Each policy may have only one deny or allow element

allow Allow | null

Allow data access based on this policy Each policy may have only one deny or allow element

defined-by FilePath | null

[Derived] Policy is defined by this file

Deny object
classifiers string[] required

Deny access when these classifiers are present

except array | null

except when these conditions hold

AllowTag object
allow required

Allow access when these classifiers are present

All of: Allow object
Allow object
classifiers string[] required

Allow access when these classifiers are present

except array | null

except when these conditions hold

DenyTag object
deny required

Allow access when these classifiers are present

All of: Deny object
Classifier object

A classifier defines the labels that can be attached to columns or a table.

name string required

The name of the classifier type

description string | null

A description of this classifier type

elements array | null

Named classifier elements

subsets array | null

Named subsets of classifier elements

defined-by FilePath | null

[Derived] Classifier is defined by this file

Element object

A classifier element is a scoped classifier label (e.g. the element PII belongs to the classifier scope data)

name string required

The name of the element

description string | null

A description of this classifier element

Subset object

A classifier subset is a scoped classifier label; it is defined by multiple elements or subsets

name string required

The name of the classifier subset

description string | null

A description of the classifier subset

values array | null

The subset is defined by unionizing all its values, elements, or subsets

Function object

A function block defines the signature for user defined

name string required

The name of the function [syntax: [[catalog.]schema].function]

parameters Parameter[] required

The arguments of this function

dialect Dialect | null

The dialect that provides this function

overload boolean | null

Override an existing function

description string | null

A description of this function

variadic Variadic | null

Arbitrary number of arguments of an common type out of a list of valid types

kind FunctionKind | null

The function kind

returns Parameter | null

The results of this function (can be a tuple)

with array | null

The generic type bounds

volatility Volatility | null

volatility - The volatility of the function.

defined-by FilePath | null

[Derived] Table is defined by this file

Variadic string | string

Arbitrary number of arguments of an common type out of a list of valid types

FunctionKind string
Parameter object

A function parameter

name string | null

The name of the parameter

description string | null

A description of this parameter

datatype string | null

The datatype of this parameter

nullable boolean | null

The nullability of this column

classifier array | null

An array of classifier references

constant string | null

The required constant value of this parameter

TypeBound object
generic string required
is-one-of string[] required
Volatility string | string | string

A function's volatility, which defines the functions eligibility for certain optimizations