본문으로 건너뛰기

ViewCreate

Request to create a logical or materialized view from one or more backing resources. Materialized views require order_by and options.refresh.

nameName (string)필수

lower_snake_case identifier from 1 to 63 characters. It must start with a lowercase letter or underscore and may contain lowercase letters, digits, and underscores.

Possible values: Value must match regular expression ^[a-z_][a-z0-9_]{0,62}$

alias object
하나 이상(anyOf)
string
typeType (string)필수

View kind: 'view' or 'materialized'

Possible values: [view, materialized]

collection_idCollection Id (string)필수

Parent collection ID (required)

Possible values: non-empty

folder_id object
하나 이상(anyOf)
string
tags object
하나 이상(anyOf)
  • Array [
  • string
  • ]
  • description object
    하나 이상(anyOf)
    string
    tables object[]필수

    Backing resources. tables[0] = primary (FROM). length ≥ 1

  • Array [
  • aliasAlias (string)필수

    SQL alias used in column references

    typeType (string)필수

    Backing resource category

    Possible values: [dataset, source]

    resourceResource (string)필수

    Identifier of the dataset or source used by this view table.

  • ]
  • joins object
    하나 이상(anyOf)
  • Array [
  • targetTarget (string)필수

    alias of the ViewTable this join introduces

    kindJoinKind (string)

    Allowed Join Kind values. Values: inner, left, right, full.

    Possible values: [inner, left, right, full]

    기본값: inner
    on object[]필수

    AND'd binary conditions

  • Array [
  • left object필수

    Join condition operand. Exactly one of column / expression set.

    column object

    Backing column reference in 'alias.col' form

    하나 이상(anyOf)
    string
    expression object

    SQL fragment when the operand is a computed expression

    하나 이상(anyOf)
    string
    right object필수

    Join condition operand. Exactly one of column / expression set.

    column object

    Backing column reference in 'alias.col' form

    하나 이상(anyOf)
    string
    expression object

    SQL fragment when the operand is a computed expression

    하나 이상(anyOf)
    string
    operatorJoinOperator (string)

    Allowed Join Operator values. Values: eq, ne, gt, gte, lt, lte.

    Possible values: [eq, ne, gt, gte, lt, lte]

    기본값: eq
  • ]
  • ]
  • schema object필수

    Output Arrow schema (REQUIRED)

    property name*any

    Output Arrow schema (REQUIRED)

    column_masks object
    하나 이상(anyOf)
    object
    row_filters object
    하나 이상(anyOf)
    kindKind (string)

    Possible values: [and, or]

    기본값: and
    conditions object[]

    Nested conditions (leaf RowFilterCondition or group RowFilter)

  • Array [
  • 하나 이상(anyOf)
    kindKind (string)
    상수 값: condition
    기본값: condition
    columnColumn (string)필수

    Column name to filter on

    operatorRowFilterOperator (string)필수

    Allowed Row Filter Operator values. Values: eq, ne, gt, gte, lt, lte, in, not_in, and 4 more.

    Possible values: [eq, ne, gt, gte, lt, lte, in, not_in, between, like, is_null, is_not_null]

    value object

    Filter value. Single value for scalar operators, list for 'in'/'not_in', 2-element list for 'between'. Omit for 'is_null'/'is_not_null'.

    하나 이상(anyOf)
  • ]
  • group_by object
    하나 이상(anyOf)
  • Array [
  • string
  • ]
  • having object
    하나 이상(anyOf)
    kindKind (string)

    Possible values: [and, or]

    기본값: and
    conditions object[]

    Nested conditions (leaf RowFilterCondition or group RowFilter)

  • Array [
  • 하나 이상(anyOf)
    kindKind (string)
    상수 값: condition
    기본값: condition
    columnColumn (string)필수

    Column name to filter on

    operatorRowFilterOperator (string)필수

    Allowed Row Filter Operator values. Values: eq, ne, gt, gte, lt, lte, in, not_in, and 4 more.

    Possible values: [eq, ne, gt, gte, lt, lte, in, not_in, between, like, is_null, is_not_null]

    value object

    Filter value. Single value for scalar operators, list for 'in'/'not_in', 2-element list for 'between'. Omit for 'is_null'/'is_not_null'.

    하나 이상(anyOf)
  • ]
  • order_by object

    MergeTree ORDER BY ⊆ schema_ fields (required when type='materialized')

    하나 이상(anyOf)
  • Array [
  • string
  • ]
  • partition_by object

    MergeTree PARTITION BY ⊆ schema_ fields (optional)

    하나 이상(anyOf)
  • Array [
  • string
  • ]
  • options object

    View options. For type=materialized, options.refresh is required as a non-empty refresh-interval expression; type=view must not set it.

    하나 이상(anyOf)
    object
    ViewCreate
    {
    "name": "string",
    "alias": "string",
    "type": "view",
    "collection_id": "string",
    "folder_id": "string",
    "tags": [
    "string"
    ],
    "description": "string",
    "tables": [
    {
    "alias": "string",
    "type": "dataset",
    "resource": "string"
    }
    ],
    "joins": [
    {
    "target": "string",
    "kind": "inner",
    "on": [
    {
    "left": {
    "column": "string",
    "expression": "string"
    },
    "right": {
    "column": "string",
    "expression": "string"
    },
    "operator": "eq"
    }
    ]
    }
    ],
    "schema": {},
    "column_masks": {},
    "row_filters": {
    "kind": "and",
    "conditions": [
    {
    "kind": "condition",
    "column": "string",
    "operator": "eq"
    },
    null
    ]
    },
    "group_by": [
    "string"
    ],
    "having": {
    "kind": "and",
    "conditions": [
    {
    "kind": "condition",
    "column": "string",
    "operator": "eq"
    },
    null
    ]
    },
    "order_by": [
    "string"
    ],
    "partition_by": [
    "string"
    ],
    "options": {}
    }