-
Notifications
You must be signed in to change notification settings - Fork 11
[PLUGIN-1895] Fixing datatype mismatch issue when value type is display #96
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
Conversation
itsankit-google
left a comment
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.
please add some description in the PR,
with brief explanation under three subheadings:
-
What is the current issue?
-
What are the changes?
-
How the changes are tested?
This will help reviewers understand the change and review PRs efficiently.
Also please create a JIRA and attached to every PR raised to open-source public repos.
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIRequestBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/source/ServiceNowMultiInputFormat.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/sink/model/ServiceNowSchemaResult.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/sink/model/ServiceNowSchemaField.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIRequestBuilder.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIClientImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIClientImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIClientImpl.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/connector/ServiceNowConnector.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/connector/ServiceNowConnector.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/connector/ServiceNowConnector.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/connector/ServiceNowConnector.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/sink/model/ServiceNowSchemaField.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/sink/model/ServiceNowSchemaField.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/source/ServiceNowMultiInputFormat.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIClientImpl.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIClientImpl.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/connector/ServiceNowConnector.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIClientImpl.java
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/connector/ServiceNowConnector.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cdap/plugin/servicenow/source/ServiceNowMultiInputFormat.java
Show resolved
Hide resolved
5d37f27 to
83da0d4
Compare

Current Issue:
It has been observed that when the display value type is selected, some values that are defined as integers in the schema appear as strings.
Code Changes:
The changes are made on how the schema is fetched. The API associated for fetching the schema is changed to use the column metadata api which now fetches the schema.
Schema API: baseUrl/api/now/doc/table/schema/tableName
Column Metadata API: baseUrl/api/now/ui/meta/tableName
In accordance with the response from the column metadata API, the SchemaResponse class is also changed to accommodate the changes. Before mapping the datatype, a check is applied that if the value type is display and if there is a mismatch between the internal_type and type then it needs to be mapped to the type otherwise internal_type.
Testing:
The code changes are verified by running unit tests and e2e tests. Also, did run the pipelines for some of the tables for Display and Actual value type.
JIRA Ticket: https://cdap.atlassian.net/browse/PLUGIN-1895