-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e2e bigquerymultitable scenarios #6
base: develop
Are you sure you want to change the base?
Conversation
# License for the specific language governing permissions and limitations under | ||
# the License. | ||
|
||
@BigQueryMultiTable_Sink |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just make the tag as BQMT_SINK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change done.
Feature: BigQueryMultiTable sink -Verification of BigQuery to BigQueryMultiTable successful data transfer using macros | ||
|
||
@MULTIPLEDATABASETABLE_SOURCE_TEST | ||
Scenario:Verify data is getting transferred from BigQuery to BQMT sink with all datatypes using macros |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the scenario it says we are running a pipeline from BQ to BQMT but we are selecting source as Multiple Database Tables
which one is it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Multiple Database Tables
|
||
@MULTIPLEDATABASETABLE_SOURCE_TEST | ||
Scenario:Verify data is getting transferred from BigQuery to BQMT sink with split field using macros | ||
Given Open Datafusion Project to configure pipeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here related to BigQuery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Multiple Database Tables
Then Validate the values of records transferred to BQMT sink is equal to the value from source MultiDatabase table | ||
|
||
@MULTIPLEDATABASETABLE_SOURCE_DATATYPES_TEST | ||
Scenario:Verify data is getting transferred from BigQuery to BQMT sink with split field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BigQuery -> Multiple Database Tables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
public static WebElement datasetProject; | ||
|
||
@FindBy(how = How.XPATH, using = "//input[@data-cy='location']") | ||
public static WebElement location; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are we using these 2 locators I don't see them in actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@FindBy(how = How.XPATH, using = "//input[@data-cy='location']") | ||
public static WebElement location; | ||
|
||
@FindBy(how = How.XPATH, using = "//*[@data-cy='sqlStatements']//*[@data-cy='key']/input") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a new property can we make a common locator out of this and add this in the framework ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@priyabhatnagar25 A generic step is added similar type of locator for BQ framework PR, I believe we can use it.
* @throws ClassNotFoundException If the class specified is not found. | ||
*/ | ||
|
||
public static boolean validateMySqlToBQRecordValues(String sourceTable) throws IOException, InterruptedException, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we are using Multiple Database table plugin here but we are using a SQL Database/Table. It would be good if we can add few comments and context here describing this in this class.
* @throws InterruptedException If the current thread is interrupted while waiting. | ||
*/ | ||
|
||
public static List<String> getTableByName() throws IOException, InterruptedException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the method name to getTableNameFromMySQL()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change done.
public static List<String> getTableByName() throws IOException, InterruptedException { | ||
List<String> tableNames = new ArrayList<>(); | ||
List<String> targetTableNames = Arrays.asList(tabA, tabB); | ||
TableResult tableResult = getTableNamesFromDataSet(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name it as getTableNamesFromBQDataSet()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change done
case Types.VARCHAR: | ||
String sourceString = rsSource.getString(currentColumnCount); | ||
// String sour = bigQueryData.get(jsonObjectIdx).get(columnTypeName).getAsString(); | ||
// String sou2 = bigQueryData.get(jsonObjectIdx).get(columnType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented line no. 155 & 156.
SeleniumHelper.getPropertiesLocators(BigQueryMultiTableLocators.class); | ||
} | ||
|
||
public static void enterSqlStatement(String value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the locator and the corresponding action to the framework repo, if it's not already there.
public static void createSourceDatatypesTable(String sourceTable) throws SQLException, ClassNotFoundException { | ||
try (Connection connect = getMysqlConnection(); Statement statement = connect.createStatement()) { | ||
String createTableQuery = "CREATE TABLE " + sourceTable + | ||
"(EmployeeID int, LastName varchar(255), City varchar(255), tablename varchar(255))"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this parameterized?
79d82d2
to
cd2286e
Compare
cd2286e
to
c5e3721
Compare
c5e3721
to
e538b69
Compare
89e0b0b
to
f0c2b16
Compare
bc7b626
to
d2c87d4
Compare
d2c87d4
to
ba19070
Compare
ba19070
to
75665bd
Compare
f9e4123
to
8b2ad66
Compare
4c9db2e
to
74e2152
Compare
170af4a
to
568fff4
Compare
d808e6f
to
0d56779
Compare
updated correct conn string, removed space in yml, removed verify goal in pom. changed sql connector java version to run in github actions and bqmt secret updated
54d7577
to
ae12e20
Compare
ae12e20
to
f8611c0
Compare
fc2efdf
to
5f4f137
Compare
e2e bigquerymultitable scenarios