Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Replace Null Date

  1. #1
    Join Date
    Jan 2013
    Posts
    108

    Default Replace Null Date

    Hi all

    I'm trying to replace the null dates of format yyyyMMdd to 00000000, so that i will have 0 in days, months and years in my dimensions while loading.

    but pentaho giving me some other date like 00021130. why is that?


    appreciate any help and suggestions
    thanky you very much in advance

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by verynew View Post
    I'm trying to replace the null dates of format yyyyMMdd to 00000000
    This looks contradictory.
    Your input is a Date field?
    Your target database is MySQL and some datetime column?
    You want to create zero dates from null values?

    Today, we strive to get rid of zero dates, not introduce them.
    If absolutely necessary I would use a default contraint for the target column.
    That way a MySQL idiosyncracy stays with MySQL and doesn't spill into your application.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Jan 2013
    Posts
    108

    Default

    My Input is Date field of yyyyMMdd format. my target in time dimension is Integer for Day, Month and year column separately in MySQL. it's not so necessary to have it as zero, but what other can i put for null dates?

  4. #4
    Join Date
    Jan 2013
    Posts
    108

    Default

    Oh i'm confused, my apologies. There is no null value in date/time dimension at all, right?

    then i am getting a birthdate from source with yyyyMMdd format and trying to find this date in my date dimension, which consists of day, month, year columns as integers. i'll try once more other way.. and let you know further

  5. #5

    Default

    Usually in your dimension you would have a row that will represent a NULL value of some sort. This may also be more than one, depending on how many reasons there may be for a NULL value. in this case you may have a row in your Date dimension with key -1 that represents missing Date.

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 - 2019 Hitachi Vantara Corporation. All Rights Reserved.