github.com/apache/beam/sdks/v2@v2.48.2/python/apache_beam/yaml/pipeline.schema.yaml (about) 1 # 2 # Licensed to the Apache Software Foundation (ASF) under one or more 3 # contributor license agreements. See the NOTICE file distributed with 4 # this work for additional information regarding copyright ownership. 5 # The ASF licenses this file to You under the Apache License, Version 2.0 6 # (the "License"); you may not use this file except in compliance with 7 # the License. You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 # 17 18 $schema: 'http://json-schema.org/schema#' 19 $id: https://github.com/apache/beam/tree/master/sdks/python/apache_beam/yaml/pipeline.schema.yaml 20 21 $defs: 22 23 transformBase: 24 type: object 25 properties: 26 type: { type: string } 27 name: { type: string } 28 input: 29 oneOf: 30 - type: string 31 - type: object 32 additionalProperties: 33 type: string 34 output: 35 oneOf: 36 - type: string 37 - type: object 38 additionalProperties: 39 type: string 40 additionalProperties: true 41 required: 42 - type 43 44 leafTransform: 45 allOf: 46 - $ref: '#/$defs/transformBase' 47 - type: object 48 properties: 49 type: 50 not: 51 anyOf: 52 - const: chain 53 - const: composite 54 args: 55 type: object 56 57 chainTransform: 58 allOf: 59 - $ref: '#/$defs/transformBase' 60 - type: object 61 properties: 62 type: 63 const: chain 64 name: {} 65 input: {} 66 output: {} 67 transforms: 68 type: array 69 items: 70 allOf: 71 - $ref: '#/$defs/transform' 72 - type: object 73 properties: 74 # Must be implicit. 75 input: { not: {} } 76 output: { not: {} } 77 additionalProperties: false 78 required: 79 - transforms 80 81 compositeTransform: 82 allOf: 83 - $ref: '#/$defs/transformBase' 84 - type: object 85 properties: 86 type: 87 const: composite 88 name: {} 89 input: {} 90 output: {} 91 transforms: 92 type: array 93 items: 94 $ref: '#/$defs/transform' 95 additionalProperties: false 96 required: 97 - transforms 98 99 transform: 100 oneOf: 101 - $ref: '#/$defs/leafTransform' 102 - $ref: '#/$defs/chainTransform' 103 - $ref: '#/$defs/compositeTransform' 104 105 provider: 106 # TODO(robertwb): Consider enumerating the provider types along with 107 # the arguments they accept/expect (possibly in a separate schema file). 108 type: object 109 properties: 110 type: { type: string } 111 transforms: 112 type: object 113 additionalProperties: 114 type: string 115 required: 116 - type 117 - transforms 118 119 type: object 120 properties: 121 pipeline: 122 type: array 123 items: 124 $ref: '#/$defs/transform' 125 providers: 126 type: array 127 items: 128 $ref: '#/$defs/provider' 129 required: 130 - pipeline