1
- Feature : CloudMySql - Verify data transfer from BigQuery source to CloudMySql sink
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.
2
14
15
+ @CloudMySql
16
+ Feature : CloudMySql Sink - Run time scenarios
17
+
18
+ @BQ_SOURCE_TEST @CLOUDMYSQL_TEST_TABLE
3
19
Scenario : To verify data is getting transferred from BigQuery source to CloudMySql sink successfully
4
20
Given Open Datafusion Project to configure pipeline
5
21
When Expand Plugin group in the LHS plugins list: "Source"
6
22
When Select plugin: "BigQuery" from the plugins list as: "Source"
23
+ And Navigate to the properties page of plugin: "BigQuery"
24
+ And Enter input plugin property: "referenceName" with value: "Reference"
25
+ And Replace input plugin property: "project" with value: "projectId"
26
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
27
+ And Enter input plugin property: "dataset" with value: "dataset"
28
+ And Enter input plugin property: "table" with value: "bqSourceTable"
29
+ Then Click on the Get Schema button
30
+ Then Verify the Output Schema matches the Expected Schema: "bqOutputMultipleDatatypesSchema"
31
+ Then Validate "BigQuery" plugin properties
32
+ And Close the Plugin Properties page
7
33
When Expand Plugin group in the LHS plugins list: "Sink"
8
34
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
9
35
Then Connect plugins: "BigQuery" and "CloudSQL MySQL" to establish connection
10
- Then Navigate to the properties page of plugin: "BigQuery"
11
- Then Replace input plugin property: "project" with value: "projectId"
12
- Then Enter input plugin property: "datasetProject" with value: "projectId"
13
- Then Enter input plugin property: "referenceName" with value: "BQReferenceName"
14
- Then Enter input plugin property: "dataset" with value: "dataset"
15
- Then Enter input plugin property: "table" with value: "bqTargetTable"
16
- # Then Click on the Get Schema button
17
- # Then Validate "BigQuery" plugin properties
18
- Then Close the Plugin Properties page
19
36
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
20
37
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql"
21
38
Then Select radio button plugin property: "instanceType" with value: "public"
22
39
Then Enter input plugin property: "connectionName" with value: "ConnectionName"
23
40
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
24
41
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
25
42
Then Enter input plugin property: "referenceName" with value: "RefName"
26
- Then Enter input plugin property: "database" with value: "TestDatabase "
27
- Then Enter input plugin property: "tableName" with value: "mytable "
28
- # Then Validate "CloudSQL MySQL" plugin properties
43
+ Then Enter input plugin property: "database" with value: "DatabaseName "
44
+ Then Replace input plugin property: "tableName" with value: "targetTable "
45
+ Then Validate "CloudSQL MySQL" plugin properties
29
46
Then Close the Plugin Properties page
30
47
Then Save the pipeline
31
48
Then Preview and run the pipeline
32
49
Then Wait till pipeline preview is in running state
33
50
Then Open and capture pipeline preview logs
34
- # Then Verify the preview run status of pipeline in the logs is "succeeded"
35
- # Then Close the pipeline logs
36
- # Then Close the preview
37
- # Then Deploy the pipeline
38
- # Then Run the Pipeline in Runtime
39
- # Then Wait till pipeline is in running state
40
- # Then Open and capture logs
41
- # Then Verify the pipeline status is "Succeeded"
42
- # Then Close the pipeline logs
43
- # Then Validate OUT record count is equal to records transferred to target BigQuery table
51
+ Then Verify the preview run status of pipeline in the logs is "succeeded"
52
+ Then Close the pipeline logs
53
+ Then Close the preview
54
+ Then Deploy the pipeline
55
+ Then Run the Pipeline in Runtime
56
+ Then Wait till pipeline is in running state
57
+ Then Open and capture logs
58
+ Then Verify the pipeline status is "Succeeded"
59
+ Then Close the pipeline logs
44
60
61
+ @BQ_SOURCE_TEST @CLOUDMYSQL_SOURCE_TEST
45
62
Scenario : To verify data is getting transferred from BigQuery source to CloudMySql sink successfully when connection arguments are set
46
63
Given Open Datafusion Project to configure pipeline
47
64
When Expand Plugin group in the LHS plugins list: "Source"
@@ -55,8 +72,8 @@ Feature: CloudMySql - Verify data transfer from BigQuery source to CloudMySql si
55
72
Then Enter input plugin property: "referenceName" with value: "BQReferenceName"
56
73
Then Enter input plugin property: "dataset" with value: "dataset"
57
74
Then Enter input plugin property: "table" with value: "bqTargetTable"
58
- # Then Click on the Get Schema button
59
- # Then Validate "BigQuery" plugin properties
75
+ Then Click on the Get Schema button
76
+ Then Validate "BigQuery" plugin properties
60
77
Then Close the Plugin Properties page
61
78
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
62
79
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql"
@@ -66,24 +83,23 @@ Feature: CloudMySql - Verify data transfer from BigQuery source to CloudMySql si
66
83
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
67
84
Then Enter input plugin property: "referenceName" with value: "RefName"
68
85
Then Enter input plugin property: "database" with value: "TestDatabase"
69
- Then Enter input plugin property: "tableName" with value: "mytable "
86
+ Then Replace input plugin property: "tableName" with value: "targetTable "
70
87
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
71
- # Then Validate "CloudSQL MySQL" plugin properties
88
+ Then Validate "CloudSQL MySQL" plugin properties
72
89
Then Close the Plugin Properties page
73
90
Then Save the pipeline
74
91
Then Preview and run the pipeline
75
92
Then Wait till pipeline preview is in running state
76
- # Then Open and capture pipeline preview logs
77
- # Then Verify the preview run status of pipeline in the logs is "succeeded"
78
- # Then Close the pipeline logs
79
- # Then Close the preview
80
- # Then Deploy the pipeline
81
- # Then Run the Pipeline in Runtime
82
- # Then Wait till pipeline is in running state
83
- # Then Open and capture logs
84
- # Then Verify the pipeline status is "Succeeded"
85
- # Then Close the pipeline logs
86
- # Then Validate OUT record count is equal to records transferred to target BigQuery table
93
+ Then Open and capture pipeline preview logs
94
+ Then Verify the preview run status of pipeline in the logs is "succeeded"
95
+ Then Close the pipeline logs
96
+ Then Close the preview
97
+ Then Deploy the pipeline
98
+ Then Run the Pipeline in Runtime
99
+ Then Wait till pipeline is in running state
100
+ Then Open and capture logs
101
+ Then Verify the pipeline status is "Succeeded"
102
+ Then Close the pipeline logs
87
103
88
104
89
105
0 commit comments