diff --git a/src/e2e-test/features/bigqueryargumentsetter/BigQueryArgumentSetterError.feature b/src/e2e-test/features/bigqueryargumentsetter/BigQueryArgumentSetterError.feature new file mode 100644 index 0000000000..283a2f21fd --- /dev/null +++ b/src/e2e-test/features/bigqueryargumentsetter/BigQueryArgumentSetterError.feature @@ -0,0 +1,29 @@ +@BigQueryArgumentSetter +Feature: BigQuery Argument Setter - Validate BigQuery Argument Setter Plugin Error Scenarios + + Scenario: Verify BigQuery Argument Setter plugin properties validation errors for mandatory fields + Given Open Datafusion Project to configure pipeline + When Expand Plugin group in the LHS plugins list: "Conditions and Actions" + When Select plugin: "BigQuery Argument Setter" from the plugins list as: "Conditions and Actions" + When Navigate to the properties page of plugin: "BigQuery Argument Setter" + Then Click on the Validate button + Then Verify mandatory property error for below listed properties: + | dataset | + | table | + | argumentSelectionConditions | + | argumentsColumns | + + Scenario:Verify BigQuery Argument Setter plugin properties validation errors for blank data in Argument selection value field + Given Open Datafusion Project to configure pipeline + When Expand Plugin group in the LHS plugins list: "Conditions and Actions" + When Select plugin: "BigQuery Argument Setter" from the plugins list as: "Conditions and Actions" + When Navigate to the properties page of plugin: "BigQuery Argument Setter" + Then Replace input plugin property: "project" with value: "projectId" + Then Enter input plugin property: "datasetProject" with value: "projectId" + Then Enter input plugin property: "dataset" with value: "dataset" + Then Enter input plugin property: "table" with value: "bqSourceTable" + Then Enter key value pairs for plugin property: "bqArgumentSetterConditionField" with values from json: "bqArgumentSetterBlankArgSelectionConditionValue" + Then Enter the Arguments Columns field as list "bqArgumentSetterInvalidColumn" + Then Override Service account details if set in environment variables + Then Click on the Validate button + Then Verify that the Plugin Property: "argumentSelectionConditions" is displaying an in-line error message: "errorMessageBlankBQArgumentColumnName" diff --git a/src/e2e-test/features/bigqueryargumentsetter/BigQueryArgumentSetterRuntime.feature b/src/e2e-test/features/bigqueryargumentsetter/BigQueryArgumentSetterRuntime.feature new file mode 100644 index 0000000000..2cb6fa77f5 --- /dev/null +++ b/src/e2e-test/features/bigqueryargumentsetter/BigQueryArgumentSetterRuntime.feature @@ -0,0 +1,145 @@ +@BigQueryArgumentSetter +Feature: BigQuery Argument Setter - e2e data transfer with source and sink + + @BQ_ARGUMENT_SETTER_TEST @BQ_SOURCE_TEST @BQ_SINK_TEST + Scenario: Verify BigQuery Argument Setter plugin functionality using BigQuery to BigQuery pipeline + Given Open Datafusion Project to configure pipeline + When Expand Plugin group in the LHS plugins list: "Sink" + When Select plugin: "BigQuery" from the plugins list as: "Sink" + When Expand Plugin group in the LHS plugins list: "Source" + When Select plugin: "BigQuery" from the plugins list as: "Source" + When Expand Plugin group in the LHS plugins list: "Conditions and Actions" + When Select plugin: "BigQuery Argument Setter" from the plugins list as: "Conditions and Actions" + Then Connect plugins: "BigQuery Argument Setter" and "BigQuery2" to establish connection + Then Connect plugins: "BigQuery2" and "BigQuery" to establish connection + When Navigate to the properties page of plugin: "BigQuery Argument Setter" + Then Replace input plugin property: "project" with value: "projectId" + Then Replace input plugin property: "datasetProjectId" with value: "projectId" + Then Enter input plugin property: "dataset" with value: "dataset" + Then Enter input plugin property: "table" with value: "bqSourceTable" + Then Enter key value pairs for plugin property: "bqArgumentSetterConditionField" with values from json: "bqArgumentSetterConditionName" + Then Enter the Arguments Columns field as list "bqArgumentSetterColumnValue" + Then Override Service account details if set in environment variables + Then Click on the Validate button + Then Close the Plugin Properties page + When Navigate to the properties page of plugin: "BigQuery2" + Then Replace input plugin property: "projectId" with value: "projectId" + Then Enter input plugin property: "datasetProjectId" with value: "projectId" + Then Override Service account details if set in environment variables + Then Enter input plugin property: "referenceName" with value: "bqArgumentSetterReferenceName" + Then Enter input plugin property: "dataset" with value: "dataset" + Then Enter input plugin property: "table" with value: "bqSourceTable" + Then Click on the Validate button + Then Close the Plugin Properties page + When Navigate to the properties page of plugin: "BigQuery" + Then Replace input plugin property: "projectId" with value: "projectId" + Then Enter input plugin property: "datasetProjectId" with value: "projectId" + Then Override Service account details if set in environment variables + Then Enter input plugin property: "referenceName" with value: "bqArgumentSetterReferenceNameSink" + Then Click on the Macro button of Property: "dataset" and set the value to: "dataset" + Then Enter input plugin property: "table" with value: "bqTargetTable" + Then Click on the Validate button + Then Close the Plugin Properties page + Then Save the pipeline + Then Deploy the pipeline + Then Run the Pipeline in Runtime + Then Run the Pipeline in Runtime with runtime arguments + Then Wait till pipeline is in running state + Then Open and capture logs + Then Verify the pipeline status is "Succeeded" + Then Validate records transferred to target table is equal to number of records from source table + + @BQ_ARGUMENT_SETTER_TEST @BQ_SOURCE_TEST @BQ_SINK_TEST + Scenario: Verify BigQuery Argument Setter plugin functionality with multiple arguments using BigQuery to BigQuery pipeline + Given Open Datafusion Project to configure pipeline + When Expand Plugin group in the LHS plugins list: "Sink" + When Select plugin: "BigQuery" from the plugins list as: "Sink" + When Expand Plugin group in the LHS plugins list: "Source" + When Select plugin: "BigQuery" from the plugins list as: "Source" + When Expand Plugin group in the LHS plugins list: "Conditions and Actions" + When Select plugin: "BigQuery Argument Setter" from the plugins list as: "Conditions and Actions" + Then Connect plugins: "BigQuery Argument Setter" and "BigQuery2" to establish connection + Then Connect plugins: "BigQuery2" and "BigQuery" to establish connection + When Navigate to the properties page of plugin: "BigQuery Argument Setter" + Then Replace input plugin property: "project" with value: "projectId" + Then Replace input plugin property: "datasetProjectId" with value: "projectId" + Then Enter input plugin property: "dataset" with value: "dataset" + Then Enter input plugin property: "table" with value: "bqSourceTable" + Then Enter key value pairs for plugin property: "bqArgumentSetterConditionField" with values from json: "bqArgumentSetterConditionName2" + Then Enter the Arguments Columns field as list "bqArgumentSetterColumnValue" + Then Override Service account details if set in environment variables + Then Click on the Validate button + Then Close the Plugin Properties page + When Navigate to the properties page of plugin: "BigQuery2" + Then Replace input plugin property: "projectId" with value: "projectId" + Then Enter input plugin property: "datasetProjectId" with value: "projectId" + Then Override Service account details if set in environment variables + Then Enter input plugin property: "referenceName" with value: "bqArgumentSetterReferenceName" + Then Enter input plugin property: "dataset" with value: "dataset" + Then Enter input plugin property: "table" with value: "bqSourceTable" + Then Click on the Validate button + Then Close the Plugin Properties page + When Navigate to the properties page of plugin: "BigQuery" + Then Replace input plugin property: "projectId" with value: "projectId" + Then Enter input plugin property: "datasetProjectId" with value: "projectId" + Then Override Service account details if set in environment variables + Then Enter input plugin property: "referenceName" with value: "bqArgumentSetterReferenceNameSink" + Then Click on the Macro button of Property: "dataset" and set the value to: "dataset" + Then Enter input plugin property: "table" with value: "bqTargetTable" + Then Click on the Validate button + Then Close the Plugin Properties page + Then Save the pipeline + Then Deploy the pipeline + Then Run the Pipeline in Runtime + Then Run the Pipeline in Runtime with runtime arguments + Then Wait till pipeline is in running state + Then Open and capture logs + Then Verify the pipeline status is "Succeeded" + Then Validate records transferred to target table is equal to number of records from source table + + @BQ_ARGUMENT_SETTER_TEST @BQ_SOURCE_TEST @BQ_SINK_TEST + Scenario: Verify BigQuery Argument Setter e2e data transfer with Invalid Values + Given Open Datafusion Project to configure pipeline + When Expand Plugin group in the LHS plugins list: "Sink" + When Select plugin: "BigQuery" from the plugins list as: "Sink" + When Expand Plugin group in the LHS plugins list: "Source" + When Select plugin: "BigQuery" from the plugins list as: "Source" + When Expand Plugin group in the LHS plugins list: "Conditions and Actions" + When Select plugin: "BigQuery Argument Setter" from the plugins list as: "Conditions and Actions" + Then Connect plugins: "BigQuery Argument Setter" and "BigQuery2" to establish connection + Then Connect plugins: "BigQuery2" and "BigQuery" to establish connection + When Navigate to the properties page of plugin: "BigQuery Argument Setter" + Then Replace input plugin property: "project" with value: "projectId" + Then Replace input plugin property: "datasetProjectId" with value: "projectId" + Then Enter input plugin property: "dataset" with value: "dataset" + Then Enter input plugin property: "table" with value: "bqSourceTable" + Then Enter key value pairs for plugin property: "bqArgumentSetterConditionField" with values from json: "bqArgumentSetterConditionInvalidName" + Then Enter the Arguments Columns field as list "bqArgumentSetterColumnValue" + Then Override Service account details if set in environment variables + Then Click on the Validate button + Then Close the Plugin Properties page + When Navigate to the properties page of plugin: "BigQuery2" + Then Replace input plugin property: "projectId" with value: "projectId" + Then Enter input plugin property: "datasetProjectId" with value: "projectId" + Then Override Service account details if set in environment variables + Then Enter input plugin property: "referenceName" with value: "bqArgumentSetterReferenceName" + Then Enter input plugin property: "dataset" with value: "dataset" + Then Enter input plugin property: "table" with value: "bqSourceTable" + Then Click on the Validate button + Then Close the Plugin Properties page + When Navigate to the properties page of plugin: "BigQuery" + Then Replace input plugin property: "projectId" with value: "projectId" + Then Enter input plugin property: "datasetProjectId" with value: "projectId" + Then Override Service account details if set in environment variables + Then Enter input plugin property: "referenceName" with value: "bqArgumentSetterReferenceNameSink" + Then Click on the Macro button of Property: "dataset" and set the value to: "dataset" + Then Enter input plugin property: "table" with value: "bqTargetTable" + Then Click on the Validate button + Then Close the Plugin Properties page + Then Save the pipeline + Then Deploy the pipeline + Then Run the Pipeline in Runtime + Then Run the Pipeline in Runtime with runtime arguments + Then Wait till pipeline is in running state + Then Open and capture logs + Then Verify the pipeline status is "Failed" diff --git a/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/actions/BQArgumentSetterActions.java b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/actions/BQArgumentSetterActions.java new file mode 100644 index 0000000000..776bed638e --- /dev/null +++ b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/actions/BQArgumentSetterActions.java @@ -0,0 +1,41 @@ +/* + * Copyright © 2022 Cask Data, Inc. + * + * Licensed 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. + */ +package io.cdap.plugin.bigqueryargumentsetter.actions; + +import io.cdap.e2e.utils.ElementHelper; +import io.cdap.e2e.utils.SeleniumHelper; +import io.cdap.plugin.bigqueryargumentsetter.locators.BQArgumentSetterLocators; +import io.cucumber.core.logging.Logger; +import io.cucumber.core.logging.LoggerFactory; + +/** + * BQArgumentSetter plugin step actions. + */ +public class BQArgumentSetterActions { + private static final Logger logger = (Logger) LoggerFactory.getLogger(BQArgumentSetterActions.class); + + static { + SeleniumHelper.getPropertiesLocators(BQArgumentSetterLocators.class); + } + + public static void enterArgumentColumn(int row, String argumentColumn) { + ElementHelper.sendKeys(BQArgumentSetterLocators.locateArgumentColumn(row), argumentColumn); + } + + public static void clickArgumentColumnsAddRowButton(int row) { + ElementHelper.clickOnElement(BQArgumentSetterLocators.locateArgumentColumnsAddRowButton(row)); + } +} diff --git a/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/actions/package-info.java b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/actions/package-info.java new file mode 100644 index 0000000000..7407c1ccd7 --- /dev/null +++ b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/actions/package-info.java @@ -0,0 +1,4 @@ +/** + * Package contains the step actions for the bigquery argument setter features. + */ +package io.cdap.plugin.bigqueryargumentsetter.actions; diff --git a/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/locators/BQArgumentSetterLocators.java b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/locators/BQArgumentSetterLocators.java new file mode 100644 index 0000000000..a9273dcb7b --- /dev/null +++ b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/locators/BQArgumentSetterLocators.java @@ -0,0 +1,35 @@ +/* + * Copyright © 2022 Cask Data, Inc. + * + * Licensed 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. + */ +package io.cdap.plugin.bigqueryargumentsetter.locators; + +import io.cdap.e2e.utils.SeleniumDriver; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; + +/** + * BQArgumentSetter Related Locators. + */ +public class BQArgumentSetterLocators { + public static WebElement locateArgumentColumn(int row) { + String xpath = "//*[@data-cy='argumentsColumns']//*[@data-cy= '" + row + "']//*[@data-cy='key']/input"; + return SeleniumDriver.getDriver().findElement(By.xpath(xpath)); + } + + public static WebElement locateArgumentColumnsAddRowButton(int row) { + String xpath = "//*[@data-cy='argumentsColumns']//*[@data-cy='" + row + "']//button[@data-cy='add-row']"; + return SeleniumDriver.getDriver().findElement(By.xpath(xpath)); + } +} diff --git a/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/locators/package-info.java b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/locators/package-info.java new file mode 100644 index 0000000000..d5ff422b5f --- /dev/null +++ b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/locators/package-info.java @@ -0,0 +1,4 @@ +/** + * Package contains the locators for the BQ Argument Setter plugin. + */ +package io.cdap.plugin.bigqueryargumentsetter.locators; diff --git a/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/runners/TestRunner.java b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/runners/TestRunner.java new file mode 100644 index 0000000000..0284b115ad --- /dev/null +++ b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/runners/TestRunner.java @@ -0,0 +1,37 @@ +/* + * Copyright © 2022 Cask Data, Inc. + * + * Licensed 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. + */ +package io.cdap.plugin.bigqueryargumentsetter.runners; + +import io.cucumber.junit.Cucumber; +import io.cucumber.junit.CucumberOptions; +import org.junit.runner.RunWith; + +/** + * Test Runner to execute BQArgumentSetter action cases. + */ +@RunWith(Cucumber.class) +@CucumberOptions( + features = {"src/e2e-test/features"}, + glue = {"io.cdap.plugin.bigqueryargumentsetter.stepsdesign", "stepsdesign", + "io.cdap.plugin.common.stepsdesign"}, + tags = {"@BigQueryArgumentSetter"}, + monochrome = true, + plugin = {"pretty", "html:target/cucumber-html-report/bigqueryargumentsetter", + "json:target/cucumber-reports/cucumber-bigqueryargumentsetter.json", + "junit:target/cucumber-reports/cucumber-bigqueryargumentsetter.xml"} +) +public class TestRunner { +} diff --git a/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/runners/package-info.java b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/runners/package-info.java new file mode 100644 index 0000000000..a29bac7b32 --- /dev/null +++ b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/runners/package-info.java @@ -0,0 +1,4 @@ +/** + * Package contains the runner for the bqArgumentSetter features. + */ +package io.cdap.plugin.bigqueryargumentsetter.runners; diff --git a/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/stepsdesign/BQArgumentSetter.java b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/stepsdesign/BQArgumentSetter.java new file mode 100644 index 0000000000..10f8d883e0 --- /dev/null +++ b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/stepsdesign/BQArgumentSetter.java @@ -0,0 +1,38 @@ +/* + * Copyright © 2022 Cask Data, Inc. + * + * Licensed 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. + */ +package io.cdap.plugin.bigqueryargumentsetter.stepsdesign; + +import io.cdap.e2e.utils.PluginPropertyUtils; +import io.cdap.plugin.bigqueryargumentsetter.actions.BQArgumentSetterActions; +import io.cucumber.java.en.Then; + +/** + * BQArgumentSetter Action related stepDesigns. + */ + +public class BQArgumentSetter { + + @Then("Enter the Arguments Columns field as list {string}") + public void enterTheArgumentsColumnsFieldAsList(String commaSeparatedFieldList) { + String[] fields = PluginPropertyUtils.pluginProp(commaSeparatedFieldList).split(","); + for (int index = 0; index < fields.length; index++) { + if (index != 0) { + BQArgumentSetterActions.clickArgumentColumnsAddRowButton(index - 1); + } + BQArgumentSetterActions.enterArgumentColumn(index, fields[index]); + } + } +} diff --git a/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/stepsdesign/package-info.java b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/stepsdesign/package-info.java new file mode 100644 index 0000000000..009e6b1c7d --- /dev/null +++ b/src/e2e-test/java/io/cdap/plugin/bigqueryargumentsetter/stepsdesign/package-info.java @@ -0,0 +1,4 @@ +/** + * Package contains the stepDesign for the BQ Argument Setter features. + */ +package io.cdap.plugin.bigqueryargumentsetter.stepsdesign; diff --git a/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetupHooks.java b/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetupHooks.java index f9fc4f422d..3f0975991d 100644 --- a/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetupHooks.java +++ b/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetupHooks.java @@ -266,7 +266,8 @@ public static void createTempSourceBQTable() throws IOException, InterruptedExce BeforeActions.scenario.write("BQ source Table " + bqSourceTable + " created successfully"); } - @After(order = 1, value = "@BQ_SOURCE_TEST or @BQ_PARTITIONED_SOURCE_TEST or @BQ_SOURCE_DATATYPE_TEST") + @After(order = 1, value = "@BQ_SOURCE_TEST or @BQ_PARTITIONED_SOURCE_TEST or @BQ_SOURCE_DATATYPE_TEST or " + + " @BQ_ARGUMENT_SETTER_TEST") public static void deleteTempSourceBQTable() throws IOException, InterruptedException { BigQueryClient.dropBqQuery(bqSourceTable); PluginPropertyUtils.removePluginProp("bqSourceTable"); @@ -732,4 +733,9 @@ private static void deleteConnection(String connectionType, String connectionNam CdfConnectionActions.selectConnectionAction(connectionType, connectionName, "Delete"); CdfPluginPropertiesActions.clickPluginPropertyButton("Delete"); } + @Before(order = 1, value = "@BQ_ARGUMENT_SETTER_TEST") + public static void createSourceBQTable() throws IOException, InterruptedException { + createSourceBQTableWithQueries(PluginPropertyUtils.pluginProp("bqArgumentSetterCreateTableQueryFile"), + PluginPropertyUtils.pluginProp("bqArgumentSetterInsertDataQueryFile")); + } } diff --git a/src/e2e-test/resources/errorMessage.properties b/src/e2e-test/resources/errorMessage.properties index d45dc5da26..4cd43e06ae 100644 --- a/src/e2e-test/resources/errorMessage.properties +++ b/src/e2e-test/resources/errorMessage.properties @@ -17,3 +17,4 @@ errorMessageIncorrectBQChunkSize=Value must be a multiple of 262144. errorMessageIncorrectBQBucketName=Bucket name can only contain lowercase letters, numbers, '.', '_', and '-'. errorMessageIncorrectBQProperty=PROPERTY name can only contain letters (lower or uppercase), numbers and '_'. errorMessageInvalidPath=Error when trying to detect schema: Input path not found +errorMessageBlankBQArgumentColumnName=1 Invalid key value pair for Argument Selection Conditions. diff --git a/src/e2e-test/resources/pluginDataCyAttributes.properties b/src/e2e-test/resources/pluginDataCyAttributes.properties index 6a955db3bf..98a5d9f6cc 100644 --- a/src/e2e-test/resources/pluginDataCyAttributes.properties +++ b/src/e2e-test/resources/pluginDataCyAttributes.properties @@ -33,3 +33,7 @@ testConnection=connection-test-button connectionCreate=connection-submit-button parsingOptionConfirm=parsing-config-confirm ## CONNECTION-MANAGEMENT-END + +## BQ-ARGUMENT-SETTER-START +bqArgumentSetterConditionField=argumentSelectionConditions +## BQ-ARGUMENT-SETTER-END diff --git a/src/e2e-test/resources/pluginParameters.properties b/src/e2e-test/resources/pluginParameters.properties index 81328f3755..e849dceaa4 100644 --- a/src/e2e-test/resources/pluginParameters.properties +++ b/src/e2e-test/resources/pluginParameters.properties @@ -230,3 +230,16 @@ gcsMoveReadRecursivePath=testdata gcsMoveReadRecursiveSubDirectory=testdata/GCS_RECURSIVE_TEST locationEU=eu ## GCSMove-PLUGIN-PROPERTIES-END + +## BQArgumentSetter-PLUGIN-PROPERTIES-START +bqArgumentSetterInvalidColumn=testInput +bqArgumentSetterBlankArgSelectionConditionValue=[{"key":"fhddv","value":""}] +bqArgumentSetterConditionName=[{"key":"name","value":"iqbal"}] +bqArgumentSetterConditionName2=[{"key":"name","value":"iqbal"},{"key":"Age","value":"25"}] +bqArgumentSetterConditionInvalidName=[{"key":"name","value":"iqbal"},{"key":"name","value":"test_automation"}] +bqArgumentSetterReferenceName=Test +bqArgumentSetterReferenceNameSink=test1 +bqArgumentSetterColumnValue=dataset +bqArgumentSetterCreateTableQueryFile=testdata/BigQuery/BigQueryArgumentSetterCreateTableQuery.txt +bqArgumentSetterInsertDataQueryFile=testdata/BigQuery/BigQueryArgumentSetterInsertDataQuery.txt +## BQArgumentSetter-PLUGIN-PROPERTIES-END diff --git a/src/e2e-test/resources/testdata/BigQuery/BigQueryArgumentSetterCreateTableQuery.txt b/src/e2e-test/resources/testdata/BigQuery/BigQueryArgumentSetterCreateTableQuery.txt new file mode 100644 index 0000000000..4901a9d670 --- /dev/null +++ b/src/e2e-test/resources/testdata/BigQuery/BigQueryArgumentSetterCreateTableQuery.txt @@ -0,0 +1,2 @@ +create table `DATASET.TABLE_NAME` (table STRING, dataset STRING, name STRING, Age INT64 +) \ No newline at end of file diff --git a/src/e2e-test/resources/testdata/BigQuery/BigQueryArgumentSetterInsertDataQuery.txt b/src/e2e-test/resources/testdata/BigQuery/BigQueryArgumentSetterInsertDataQuery.txt new file mode 100644 index 0000000000..e89852cfab --- /dev/null +++ b/src/e2e-test/resources/testdata/BigQuery/BigQueryArgumentSetterInsertDataQuery.txt @@ -0,0 +1,2 @@ +insert into `DATASET.TABLE_NAME` (table, dataset, name, Age) values +('one','test_automation','iqbal', 25); \ No newline at end of file