-
Notifications
You must be signed in to change notification settings - Fork 11
Add a flag to check the new metadata api is called for DTS users only #100
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?
Conversation
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIClientImpl.java
Show resolved
Hide resolved
this.setUrl(String.format(METADATA_API_URL_TEMPLATE, instanceBaseUrl, tableName)); | ||
} else if (isSchemaRequired) { |
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.
what is the difference between metadata api vs schema api?
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.
metadata api uses column info which in turn is used to create a schema based on value type and schema api provides with the schema based on actual type only.
Schema api was being used earlier
src/main/java/io/cdap/plugin/servicenow/sink/model/SchemaResponseWithoutMetadata.java
Outdated
Show resolved
Hide resolved
Reverse the naming convention, let the old schema response and field name class be same and new class can be MetaDataAPISchema and field. |
As the schema changed logic is changed based on the value type being used. Older pipelines are not compatible with this change.
Added a flag, which ensures that for DTS users, schema will be fetched via column metadata api and for CDF users it will be fetched via previous schema api.