|
| 1 | +# Copyright © 2024 Cask Data, Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 | +# use this file except in compliance with the License. You may obtain a copy of |
| 5 | +# the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | +# License for the specific language governing permissions and limitations under |
| 13 | +# the License. |
| 14 | +@BigTable @BIGTABLE_SOURCE_TEST |
| 15 | +Feature: BigTable source - Verification of BigTable to BigTable Successful Data Transfer |
| 16 | + |
| 17 | + @BIGTABLE_SINK_TEST |
| 18 | + Scenario: To verify data is getting transferred from BigTable source table to BigTable sink table |
| 19 | + Given Open Datafusion Project to configure pipeline |
| 20 | + When Select plugin: "Bigtable" from the plugins list as: "Source" |
| 21 | + When Expand Plugin group in the LHS plugins list: "Sink" |
| 22 | + When Select plugin: "Bigtable" from the plugins list as: "Sink" |
| 23 | + Then Connect plugins: "Bigtable" and "Bigtable2" to establish connection |
| 24 | + Then Navigate to the properties page of plugin: "Bigtable" |
| 25 | + Then Enter input plugin property: "referenceName" with value: "CBTSourceReferenceName" |
| 26 | + Then Replace input plugin property: "project" with value: "projectId" |
| 27 | + Then Enter input plugin property: "instance" with value: "bigtableInstance" |
| 28 | + Then Enter input plugin property: "table" with value: "bigtableSourceTable" |
| 29 | + Then Replace input plugin property: "keyAlias" with value: "id" |
| 30 | + Then Enter key value pairs for plugin property: "columnMappings" with values from json: "cbtsourceMappings" |
| 31 | + Then Select Macro action of output schema property: "outputSchemaMacroInput" and set the value to "macroKeyString" |
| 32 | + Then Validate "Bigtable" plugin properties |
| 33 | + Then Close the Plugin Properties page |
| 34 | + Then Navigate to the properties page of plugin: "Bigtable2" |
| 35 | + Then Enter input plugin property: "referenceName" with value: "CBTSinkReferenceName" |
| 36 | + Then Replace input plugin property: "project" with value: "projectId" |
| 37 | + Then Enter input plugin property: "instance" with value: "bigtableTargetInstance" |
| 38 | + Then Enter input plugin property: "table" with value: "bigtableTargetTable" |
| 39 | + Then Replace input plugin property: "keyAlias" with value: "id" |
| 40 | + Then Enter key value pairs for plugin property: "columnMappings" with values from json: "cbtsinkMappings" |
| 41 | + Then Validate "Bigtable" plugin properties |
| 42 | + Then Close the Plugin Properties page |
| 43 | + Then Save the pipeline |
| 44 | + Then Deploy the pipeline |
| 45 | + Then Run the Pipeline in Runtime |
| 46 | + Then Enter runtime argument value "cbtSourceOutputSchema" for key "macroKeyString" |
| 47 | + Then Run the Pipeline in Runtime with runtime arguments |
| 48 | + Then Wait till pipeline is in running state |
| 49 | + Then Open and capture logs |
| 50 | + Then Verify the pipeline status is "Succeeded" |
| 51 | + Then Validate OUT record count is equal to IN record count |
| 52 | + Then Validate data transferred to target bigtable table with data of source bigtable table |
| 53 | + |
| 54 | + @EXISTING_BIGTABLE_SINK |
| 55 | + Scenario: To verify data is getting transferred from BigTable source table to existing BigTable sink |
| 56 | + Given Open Datafusion Project to configure pipeline |
| 57 | + When Select plugin: "Bigtable" from the plugins list as: "Source" |
| 58 | + When Expand Plugin group in the LHS plugins list: "Sink" |
| 59 | + When Select plugin: "Bigtable" from the plugins list as: "Sink" |
| 60 | + Then Connect plugins: "Bigtable" and "Bigtable2" to establish connection |
| 61 | + Then Navigate to the properties page of plugin: "Bigtable" |
| 62 | + Then Enter input plugin property: "referenceName" with value: "CBTSourceReferenceName" |
| 63 | + Then Replace input plugin property: "project" with value: "projectId" |
| 64 | + Then Enter input plugin property: "instance" with value: "bigtableInstance" |
| 65 | + Then Enter input plugin property: "table" with value: "bigtableSourceTable" |
| 66 | + Then Replace input plugin property: "keyAlias" with value: "id" |
| 67 | + Then Enter key value pairs for plugin property: "columnMappings" with values from json: "cbtsourceMappings" |
| 68 | + Then Select Macro action of output schema property: "outputSchemaMacroInput" and set the value to "macroKeyString" |
| 69 | + Then Validate "Bigtable" plugin properties |
| 70 | + Then Close the Plugin Properties page |
| 71 | + Then Navigate to the properties page of plugin: "Bigtable2" |
| 72 | + Then Enter input plugin property: "referenceName" with value: "CBTSinkReferenceName" |
| 73 | + Then Replace input plugin property: "project" with value: "projectId" |
| 74 | + Then Enter input plugin property: "instance" with value: "bigtableTargetInstance" |
| 75 | + Then Enter input plugin property: "table" with value: "bigtableTargetExistingTable" |
| 76 | + Then Replace input plugin property: "keyAlias" with value: "id" |
| 77 | + Then Enter key value pairs for plugin property: "columnMappings" with values from json: "cbtsinkMappings" |
| 78 | + Then Validate "Bigtable" plugin properties |
| 79 | + Then Close the Plugin Properties page |
| 80 | + Then Save the pipeline |
| 81 | + Then Deploy the pipeline |
| 82 | + Then Run the Pipeline in Runtime |
| 83 | + Then Enter runtime argument value "cbtSourceOutputSchema" for key "macroKeyString" |
| 84 | + Then Run the Pipeline in Runtime with runtime arguments |
| 85 | + Then Wait till pipeline is in running state |
| 86 | + Then Open and capture logs |
| 87 | + Then Verify the pipeline status is "Succeeded" |
| 88 | + Then Validate OUT record count is equal to IN record count |
| 89 | + Then Validate data transferred to existing target bigtable table with data of source bigtable table |
| 90 | + |
| 91 | + @BIGTABLE_SINK_TEST |
| 92 | + Scenario: To verify data is getting transferred from unvalidated BigTable source table to BigTable sink table |
| 93 | + Given Open Datafusion Project to configure pipeline |
| 94 | + When Select plugin: "Bigtable" from the plugins list as: "Source" |
| 95 | + When Expand Plugin group in the LHS plugins list: "Sink" |
| 96 | + When Select plugin: "Bigtable" from the plugins list as: "Sink" |
| 97 | + Then Connect plugins: "Bigtable" and "Bigtable2" to establish connection |
| 98 | + Then Navigate to the properties page of plugin: "Bigtable" |
| 99 | + Then Enter input plugin property: "referenceName" with value: "CBTSourceReferenceName" |
| 100 | + Then Replace input plugin property: "project" with value: "projectId" |
| 101 | + Then Enter input plugin property: "instance" with value: "bigtableInstance" |
| 102 | + Then Enter input plugin property: "table" with value: "bigtableSourceTable" |
| 103 | + Then Replace input plugin property: "keyAlias" with value: "id" |
| 104 | + Then Enter key value pairs for plugin property: "columnMappings" with values from json: "cbtsourceMappings" |
| 105 | + Then Select Macro action of output schema property: "outputSchemaMacroInput" and set the value to "macroKeyString" |
| 106 | + Then Close the Plugin Properties page |
| 107 | + Then Navigate to the properties page of plugin: "Bigtable2" |
| 108 | + Then Enter input plugin property: "referenceName" with value: "CBTSinkReferenceName" |
| 109 | + Then Replace input plugin property: "project" with value: "projectId" |
| 110 | + Then Enter input plugin property: "instance" with value: "bigtableTargetInstance" |
| 111 | + Then Enter input plugin property: "table" with value: "bigtableTargetTable" |
| 112 | + Then Replace input plugin property: "keyAlias" with value: "id" |
| 113 | + Then Enter key value pairs for plugin property: "columnMappings" with values from json: "cbtsinkMappings" |
| 114 | + Then Validate "Bigtable" plugin properties |
| 115 | + Then Close the Plugin Properties page |
| 116 | + Then Save the pipeline |
| 117 | + Then Deploy the pipeline |
| 118 | + Then Run the Pipeline in Runtime |
| 119 | + Then Enter runtime argument value "cbtSourceOutputSchema" for key "macroKeyString" |
| 120 | + Then Run the Pipeline in Runtime with runtime arguments |
| 121 | + Then Wait till pipeline is in running state |
| 122 | + Then Open and capture logs |
| 123 | + Then Verify the pipeline status is "Succeeded" |
| 124 | + Then Validate OUT record count is equal to IN record count |
| 125 | + Then Validate data transferred to target bigtable table with data of source bigtable table |
0 commit comments