javatimestampdenodo

Denodo customWrapper Datetime field is not working in environment


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);
    }
  1. to make this working, Do i need to change any settings?
  2. it's all hard coding, I don't think there is any code problem. This code is mention on below link https://community.denodo.com/docs/html/browse/7.0/vdp/developer/developing_extensions/developing_custom_wrappers/dealing_with_datetime_and_interval_types

Solution

  • 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.