# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # pipelines: # Simple Create with element list - pipeline: type: chain transforms: - type: Create config: elements: [1,2,3,4,5] - type: AssertEqual config: elements: - {element: 1} - {element: 2} - {element: 3} - {element: 4} - {element: 5} # Simple Create with more complex beam row - pipeline: type: chain transforms: - type: Create config: elements: - {first: 0, second: [1,2,3]} - {first: 1, second: [4,5,6]} - type: AssertEqual config: elements: - {first: 0, second: [1,2,3]} - {first: 1, second: [4,5,6]} # Simple Create with reshuffle - pipeline: type: chain transforms: - type: Create config: elements: - {first: 0, second: [1,2,3]} - {first: 1, second: [4,5,6]} - {first: 2, second: [7,8,9]} reshuffle: false - type: AssertEqual config: elements: - {first: 0, second: [1,2,3]} - {first: 1, second: [4,5,6]} - {first: 2, second: [7,8,9]} # Simple Create with element list - pipeline: type: chain transforms: - type: Create config: elements: - {sdk: MapReduce, year: 2004} - {sdk: Flume} - {sdk: MillWheel, year: 2008} - type: AssertEqual config: elements: - {sdk: MapReduce, year: 2004} - {sdk: Flume} - {sdk: MillWheel, year: 2008} # Simple Create with explicit null value - pipeline: type: chain transforms: - type: Create config: elements: - {sdk: MapReduce, year: 2004} - {sdk: Flume, year: null} - {sdk: MillWheel, year: 2008} - type: AssertEqual config: elements: - {sdk: MapReduce, year: 2004} - {sdk: Flume, year: null} - {sdk: MillWheel, year: 2008} # Simple Create with explicit null values for the entire record - pipeline: type: chain transforms: - type: Create config: elements: - {sdk: MapReduce, year: 2004} - {sdk: null, year: null} - {sdk: MillWheel, year: 2008} - type: AssertEqual config: elements: - {sdk: MapReduce, year: 2004} - {} - {sdk: MillWheel, year: 2008} # Simple Create with output schema check - pipeline: type: chain transforms: - type: Create config: elements: - {sdk: MapReduce, year: 2004} - {sdk: MillWheel, year: 2008} output_schema: type: object properties: sdk: type: string year: type: integer - type: AssertEqual config: elements: - {sdk: MapReduce, year: 2004} - {sdk: MillWheel, year: 2008} # Simple Create with mixed types - pipeline: type: chain transforms: - type: Create config: elements: - 1 - {a: 2, c: "hello"} - 3 - type: AssertEqual config: elements: - {element: 1, a: null, c: null} - {element: null, a: 2, c: "hello"} - {element: 3, a: null, c: null}