|
| 1 | +# Copyright © 2023 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 | + |
| 15 | +@BQMT_SINK |
| 16 | +Feature: BigQueryMultiTable sink -Verification of Multiple Database Tables to BigQueryMultiTable successful data transfer using macros |
| 17 | + |
| 18 | + @MULTIPLEDATABASETABLE_SOURCE_TEST @BQMT_Required @PLUGIN-1669 |
| 19 | + Scenario:Verify data is getting transferred from Multiple Database Tables to BQMT sink with all datatypes using macros |
| 20 | + Given Open Datafusion Project to configure pipeline |
| 21 | + When Expand Plugin group in the LHS plugins list: "Source" |
| 22 | + When Select plugin: "Multiple Database Tables" from the plugins list as: "Source" |
| 23 | + When Expand Plugin group in the LHS plugins list: "Sink" |
| 24 | + When Select plugin: "BigQuery Multi Table" from the plugins list as: "Sink" |
| 25 | + Then Navigate to the properties page of plugin: "Multiple Database Tables" |
| 26 | + Then Replace input plugin property: "referenceName" with value: "ref" |
| 27 | + Then Enter input plugin property: "connectionString" with value: "connectionString" for Credentials and Authorization related fields |
| 28 | + Then Replace input plugin property: "jdbcPluginName" with value: "mysql" |
| 29 | + Then Replace input plugin property: "user" with value: "user" for Credentials and Authorization related fields |
| 30 | + Then Replace input plugin property: "password" with value: "pass" for Credentials and Authorization related fields |
| 31 | + And Select radio button plugin property: "dataSelectionMode" with value: "sql-statements" |
| 32 | + Then Click on the Add Button of the property: "sqlStatements" with value: |
| 33 | + | selectQuery| |
| 34 | + Then Validate "Multiple Database Tables" plugin properties |
| 35 | + And Close the Plugin Properties page |
| 36 | + Then Navigate to the properties page of plugin: "BigQuery Multi Table" |
| 37 | + And Enter input plugin property: "referenceName" with value: "Reference" |
| 38 | + Then Click on the Macro button of Property: "projectId" and set the value to: "bqProjectId" |
| 39 | + Then Click on the Macro button of Property: "datasetProjectId" and set the value to: "bqDatasetProjectId" |
| 40 | + Then Click on the Macro button of Property: "serviceAccountType" and set the value to: "serviceAccountType" |
| 41 | + Then Click on the Macro button of Property: "serviceAccountFilePath" and set the value to: "serviceAccount" |
| 42 | + Then Click on the Macro button of Property: "dataset" and set the value to: "bqDataset" |
| 43 | + Then Click plugin property: "truncateTable" |
| 44 | + Then Click plugin property: "allowSchema" |
| 45 | + Then Validate "BigQuery Multi Table" plugin properties |
| 46 | + And Close the Plugin Properties page |
| 47 | + Then Connect plugins: "Multiple Database Tables" and "BigQuery Multi Table" to establish connection |
| 48 | + Then Save the pipeline |
| 49 | + Then Preview and run the pipeline |
| 50 | + Then Enter runtime argument value "projectId" for key "bqProjectId" |
| 51 | + Then Enter runtime argument value "projectId" for key "bqDatasetProjectId" |
| 52 | + Then Enter runtime argument value "serviceAccountType" for key "serviceAccountType" |
| 53 | + Then Enter runtime argument value "serviceAccount" for key "serviceAccount" |
| 54 | + Then Enter runtime argument value "dataset" for key "bqDataset" |
| 55 | + Then Run the preview of pipeline with runtime arguments |
| 56 | + Then Wait till pipeline preview is in running state |
| 57 | + Then Open and capture pipeline preview logs |
| 58 | + Then Verify the preview run status of pipeline in the logs is "succeeded" |
| 59 | + Then Close the pipeline logs |
| 60 | + Then Close the preview |
| 61 | + Then Deploy the pipeline |
| 62 | + Then Run the Pipeline in Runtime |
| 63 | + Then Enter runtime argument value "projectId" for key "bqProjectId" |
| 64 | + Then Enter runtime argument value "projectId" for key "bqDatasetProjectId" |
| 65 | + Then Enter runtime argument value "serviceAccountType" for key "serviceAccountType" |
| 66 | + Then Enter runtime argument value "serviceAccount" for key "serviceAccount" |
| 67 | + Then Enter runtime argument value "dataset" for key "bqDataset" |
| 68 | + Then Run the Pipeline in Runtime with runtime arguments |
| 69 | + Then Wait till pipeline is in running state |
| 70 | + Then Open and capture logs |
| 71 | + Then Verify the pipeline status is "Succeeded" |
| 72 | + Then Validate the values of records transferred to BQMT sink is equal to the value from source MultiDatabase table |
| 73 | + |
| 74 | + @MULTIPLEDATABASETABLE_SOURCE_TEST @BQMT_Required @PLUGIN-1669 |
| 75 | + Scenario:Verify data is getting transferred from Multiple Database Tables to BQMT sink with split field using macros |
| 76 | + Given Open Datafusion Project to configure pipeline |
| 77 | + When Expand Plugin group in the LHS plugins list: "Source" |
| 78 | + When Select plugin: "Multiple Database Tables" from the plugins list as: "Source" |
| 79 | + When Expand Plugin group in the LHS plugins list: "Sink" |
| 80 | + When Select plugin: "BigQuery Multi Table" from the plugins list as: "Sink" |
| 81 | + Then Navigate to the properties page of plugin: "Multiple Database Tables" |
| 82 | + Then Replace input plugin property: "referenceName" with value: "ref" |
| 83 | + Then Enter input plugin property: "connectionString" with value: "connectionString" for Credentials and Authorization related fields |
| 84 | + Then Replace input plugin property: "jdbcPluginName" with value: "mysql" |
| 85 | + Then Replace input plugin property: "user" with value: "user" for Credentials and Authorization related fields |
| 86 | + Then Replace input plugin property: "password" with value: "pass" for Credentials and Authorization related fields |
| 87 | + And Select radio button plugin property: "dataSelectionMode" with value: "sql-statements" |
| 88 | + Then Click on the Add Button of the property: "sqlStatements" with value: |
| 89 | + | selectQuery| |
| 90 | + Then Validate "Multiple Database Tables" plugin properties |
| 91 | + And Close the Plugin Properties page |
| 92 | + Then Navigate to the properties page of plugin: "BigQuery Multi Table" |
| 93 | + And Enter input plugin property: "referenceName" with value: "Reference" |
| 94 | + Then Click on the Macro button of Property: "projectId" and set the value to: "bqProjectId" |
| 95 | + Then Click on the Macro button of Property: "datasetProjectId" and set the value to: "bqDatasetProjectId" |
| 96 | + Then Click on the Macro button of Property: "serviceAccountType" and set the value to: "serviceAccountType" |
| 97 | + Then Click on the Macro button of Property: "serviceAccountFilePath" and set the value to: "serviceAccount" |
| 98 | + Then Click on the Macro button of Property: "dataset" and set the value to: "bqDataset" |
| 99 | + Then Click on the Macro button of Property: "SplitField" and set the value to: "bqmtSplitField" |
| 100 | + Then Click plugin property: "truncateTable" |
| 101 | + Then Click plugin property: "allowSchema" |
| 102 | + Then Validate "BigQuery Multi Table" plugin properties |
| 103 | + And Close the Plugin Properties page |
| 104 | + Then Connect plugins: "Multiple Database Tables" and "BigQuery Multi Table" to establish connection |
| 105 | + Then Save the pipeline |
| 106 | + Then Preview and run the pipeline |
| 107 | + Then Enter runtime argument value "projectId" for key "bqProjectId" |
| 108 | + Then Enter runtime argument value "projectId" for key "bqDatasetProjectId" |
| 109 | + Then Enter runtime argument value "serviceAccountType" for key "serviceAccountType" |
| 110 | + Then Enter runtime argument value "serviceAccount" for key "serviceAccount" |
| 111 | + Then Enter runtime argument value "dataset" for key "bqDataset" |
| 112 | + Then Enter runtime argument value "splitField" for key "bqmtSplitField" |
| 113 | + Then Run the preview of pipeline with runtime arguments |
| 114 | + Then Wait till pipeline preview is in running state |
| 115 | + Then Open and capture pipeline preview logs |
| 116 | + Then Verify the preview run status of pipeline in the logs is "succeeded" |
| 117 | + Then Close the pipeline logs |
| 118 | + Then Close the preview |
| 119 | + Then Deploy the pipeline |
| 120 | + Then Run the Pipeline in Runtime |
| 121 | + Then Enter runtime argument value "projectId" for key "bqProjectId" |
| 122 | + Then Enter runtime argument value "projectId" for key "bqDatasetProjectId" |
| 123 | + Then Enter runtime argument value "serviceAccountType" for key "serviceAccountType" |
| 124 | + Then Enter runtime argument value "serviceAccount" for key "serviceAccount" |
| 125 | + Then Enter runtime argument value "dataset" for key "bqDataset" |
| 126 | + Then Enter runtime argument value "splitField" for key "bqmtSplitField" |
| 127 | + Then Run the Pipeline in Runtime with runtime arguments |
| 128 | + Then Wait till pipeline is in running state |
| 129 | + Then Open and capture logs |
| 130 | + Then Verify the pipeline status is "Succeeded" |
| 131 | + Then Validate the values of records transferred to BQMT sink is equal to the value from source MultiDatabase table |
0 commit comments