Skip to main content

Hi experts,

 

I try to define delta filters for a SAP table that has columns with create/change dates as timestamp (for example, 20220615023536):

  • when I use "date" type for the dynamic parameter - I get error during extraction: Value 2.0220804014626E13 could not be read as Date, expected formats: yyyy/MM/dd, yyyy-MM-dd, yyyyMMdd, dd/MM/yyyy, dd-MM-yyyy, ddMMyyyy
  • when I use "text" type for the dynamic parameter - I get error during extraction: Value 2.0220804014626E13 could not be read as Text
  • when I use "integer" type for the dynamic parameter - I don't get error, but the value is calculated as 2147483647 instead of the original value - 20220804014626

 

Could you advise if there is a proper way to work with timestamps like columns?

 

As the table holds different SAP objects at the same time, I can't use max ID or something like that. I could divide the extraction job into several separate jobs (for each involved SAP object) and create delta filters based on SAP object ID (max value), but the appearance of the SAP objects in the table is not sequential and this rule won't work... I assume I have to extract all records...

I would be very interested in seeing this question answered, as well!

 

FYI, what we're doing - as a band-aid solution - is, in the Delta Filter Section, stating the following:

CR_TIMESTAMP >= 20210101000000.0 AND CH_TIMESTAMP >= 20220601000000.0

 

This is obviously not a Dynamic Parameter and, as such needs to be changed periodically..

 

I have no visibility on values being calculated incorrectly, but what you're describing (2147483647) is the maximum value allowed for an Integer type.

 

I don't know if there is a way to combine TODAY(), YEAR(), etc. in order to achieve a dynamic result (should it maybe be a STRING?), but I would be very interested in seeing that done

 

I hope this sheds some light on the issue, despite not resolving it

 

Best Regards,

 

Vasco Carona

 


Hi @anton.kozhi,

 

We handle this by using a helper table that stores the correct values of the parameters as a single row, and create a pool-parameter based on this table. By running the transformation directly after the extraction, it updates itself.

 

Follow these steps:

  1. Format your column as a character due to integer restrictions (in vertica (the SQL dialect in Data Integration, an integer should have 19 decimals (INTEGER (vertica.com)), but since @vasco.caron11 checked this, maybe the pool parameter integer type is restricted)
  2. Create a transformation and let it create a table -> CREATE TABLE (vertica.com)
  3. Populate one column with the max timestamp value and set it as a string/char
  4. Create a dynamic text pool parameter based on this table, and use the max value option. It will load the entry of point 2.
  5. Now use this parameter in your extractions.

 

It is quite an ugly workaround, but yeah, it works in our cases.

 

I hope this helps you.

 

Kind regards,

Jan-peter

 


Reply