| # |
| # 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 Flatten with three inputs |
| - pipeline: |
| type: composite |
| transforms: |
| - type: Create |
| name: CreateA |
| config: |
| elements: |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - type: Create |
| name: CreateB |
| config: |
| elements: |
| - {transaction_id: "T0024", product_name: "Aluminum Mug", category: "Kitchen", price: 29.9} |
| - type: Create |
| name: CreateC |
| config: |
| elements: |
| - {transaction_id: "T0104", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T0302", product_name: "Monitor", category: "Electronics", price: 249.99} |
| - type: Flatten |
| input: [CreateA, CreateB, CreateC] |
| - type: AssertEqual |
| input: Flatten |
| config: |
| elements: |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - {transaction_id: "T0024", product_name: "Aluminum Mug", category: "Kitchen", price: 29.9} |
| - {transaction_id: "T0104", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T0302", product_name: "Monitor", category: "Electronics", price: 249.99} |
| |
| # Simple Flatten with one input |
| - pipeline: |
| type: composite |
| transforms: |
| - type: Create |
| name: CreateA |
| config: |
| elements: |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - {transaction_id: "T0024", product_name: "Aluminum Mug", category: "Kitchen", price: 29.9} |
| - type: Flatten |
| input: CreateA |
| - type: AssertEqual |
| input: Flatten |
| config: |
| elements: |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - {transaction_id: "T0024", product_name: "Aluminum Mug", category: "Kitchen", price: 29.9} |
| |
| # Simple Flatten with duplicates in each input |
| - pipeline: |
| type: composite |
| transforms: |
| - type: Create |
| name: CreateA |
| config: |
| elements: |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - type: Create |
| name: CreateB |
| config: |
| elements: |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - type: Flatten |
| input: [CreateA, CreateB] |
| - type: AssertEqual |
| input: Flatten |
| config: |
| elements: |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| |
| # Simple Flatten with duplicates across inputs |
| - pipeline: |
| type: composite |
| transforms: |
| - type: Create |
| name: CreateA |
| config: |
| elements: |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - type: Create |
| name: CreateB |
| config: |
| elements: |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - type: Flatten |
| input: [CreateA, CreateB] |
| - type: AssertEqual |
| input: Flatten |
| config: |
| elements: |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T0012", product_name: "Headphones", category: "Electronics", price: 59.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |
| - {transaction_id: "T5034", product_name: "Leather Jacket", category: "Apparel", price: 109.99} |