Denodo custom Wrapper I am using below code, In the timestamp_field, timestamptz_field column is coming blank.
@Override
public CustomWrapperSchemaParameter[] getSchemaParameters(
Map<String, String> inputValues) {
return new CustomWrapperSchemaParameter[] {
new CustomWrapperSchemaParameter("date_field", java.sql.Types.DATE)
, new CustomWrapperSchemaParameter("timestamp_field", java.sql.Types.TIMESTAMP)
, new CustomWrapperSchemaParameter("timestamptz_field", java.sql.Types.TIMESTAMP_WITH_TIMEZONE)
, new CustomWrapperSchemaParameter("time_field", java.sql.Types.TIME)
};
}
@Override
public void run(CustomWrapperConditionHolder condition,List<CustomWrapperFieldExpression> projectedFields,CustomWrapperResult result, Map<String,String> inputValues)
throws CustomWrapperException {
String strDatewithTime="2019-08-29 20:46:46.166666700";
// TODO Auto-generated method stub
int index = strDatewithTime.indexOf(".");
if(index>0)
{
strDatewithTime= strDatewithTime.substring(0, index);
}
DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
result.addRow(new Object[]{
LocalDate.parse("2017-10-11"),
LocalDateTime.parse(strDatewithTime,FORMATTER),
OffsetDateTime.parse("2015-03-08T01:59:59+01:00"),
LocalTime.parse("21:15:45")},
projectedFields);
}
I have found the issue and resolved. Local VDP client needs some patches. Server vdp has installed some additional patches. Code was correct. After installing those patches, Data is coming up properly. I figure it out by looking into vdp admin each options. Thanks all of you for support.