Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: How to obtain Timestamp in PDI?

  1. #1
    Join Date
    Jun 2016
    Posts
    168

    Default How to obtain Timestamp in PDI?

    I use Get System Info to have date. Then I use Select Values step and format it to Timestamp.
    But in other steps I see '208/11/19...' or ''####0;-####0' instead of '1541767114000' or similar.
    Looks like Select Values does not work...

    Best way would be to get reall timestamp in Java step. How to obtain that?
    Regards

  2. #2
    Join Date
    Jun 2016
    Posts
    168

    Default

    Get System Info (system date variable) => Select Values (Integer)...
    Right?

  3. #3
    Join Date
    Aug 2016
    Posts
    239

    Default

    Yes, that's how it works. You should try to isolate what you're trying to figure out: whether "Get System Info" step works or "Select Values" work. I tried recreating your scenario, and in my case both works as expected.

  4. #4
    Join Date
    Apr 2008
    Posts
    4,639

    Default

    I seem to recall that you have a bit of a programming background Gosforth.
    As such, you are likely thinking of Timestamp as a Unix Epoch value (either in seconds or milliseconds)

    In PDI, when you're looking at data types, you can almost always prepend "SQL" for your queries, and you'll get close. So if you search for "SQL Timestamp", you'll find that Timestamp is actually a Date/Time type.

    If you're looking for "number of (milli)seconds since 1970-01-01 00:00:00 UTC", you're looking for an Integer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.