You can translate the question and the replies:

Datetime issue

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); } to make this working, Do i need to change any settings? it's all hard coding, I don't think there is any code problem. This code is mention on below link it's giving default value 1970-01-17 00:00:00

1 Answer

Hi, I have created the custom wrapper with the same code by using the [Denodo 4E plugin]( The plugin has all the necessary dependencies that are required to develop Stored Procedures. After successfully created the custom wrapper, I deployed the custom wrapper to Virtual DataPort current version (denodo-update-20190903). In Virtual DataPort, I have created the base view for the custom wrapper. When I execute the base view I was able to get the expected result in both the timestamp_field, timestamptz_field column. So I suggest you to try the customer wrapper in the current update of the Denodo Platform. You can download the current Denodo Express from the [here]( Hope this helps!
Denodo Team
10-10-2019 07:43:52 -0400
You must sign in to add an answer. If you do not have an account, you can register here