-
Notifications
You must be signed in to change notification settings - Fork 11
data validation for serviceNow #92
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
base: develop
Are you sure you want to change the base?
data validation for serviceNow #92
Conversation
35e2570
to
ed5f4a3
Compare
ed5f4a3
to
e37c6e7
Compare
String columnType = field.getType().toString(); | ||
|
||
switch (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.
nit: remove extra line
boolean targetAsBoolean = bigQueryRow.get(columnName).getAsBoolean(); | ||
Assert.assertEquals("Different values found for column : %s", sourceAsBoolean, targetAsBoolean); | ||
break; | ||
|
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.
nit: remove extra line
int targetAsInteger = bigQueryRow.get(columnName).getAsInt(); | ||
Assert.assertEquals("Different values found for column : %s", sourceAsInteger, targetAsInteger); | ||
break; | ||
|
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.
nit: remove extra line
LocalDateTime targetDateTime = LocalDateTime.parse(bigQueryRow.get(columnName).getAsString()); | ||
Assert.assertEquals("Different values found for column : %s", sourceDateTime, targetDateTime); | ||
break; | ||
|
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.
nit: remove extra line
Assert.assertEquals(String.format("Different values found for column: %s", columnName), 0, | ||
Double.compare(sourceVal, targetVal)); | ||
break; | ||
|
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.
nit: remove extra line
e37c6e7
to
b3e4645
Compare
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.
I do not see any AfterHooks configured to delete the BQ tables?
Please add them in all the tests.
added for both sink and source |
f723415
to
64cd3b1
Compare
408705a
to
4b5336e
Compare
throws IOException, ServiceNowAPIException { | ||
BeforeActions.scenario.write("Create new record in Date time table"); | ||
ServiceNowTableAPIClientImpl tableAPIClient = new ServiceNowTableAPIClientImpl(config.getConnection()); | ||
String recordDetails = "{'u_date':'2025-05-28 00:00:00','u_datetime':'2025-05-28 15:07:56'}"; |
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.
this is just testing one format, plan was to test all formats added in https://github.com/data-integrations/servicenow-plugins/pull/88/files
This PR contains changes related to fix the data validation logic for service now and bigquery.