Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Insert empty date in PostgreSQL

  1. #1

    Default Insert empty date in PostgreSQL

    I have a step that reads a csv file and inserts rows into a Postgre table.

    Some date fields come empty (for example: atual end date) in some rows. So, this field must remain empty in the table.

    What do I have to do?

    Thanks

    Osmar Mateus

  2. #2

    Default

    Maybe there is something I'm overlooking, but as long as the database allows null values (and your Pentaho processes), you should be fine.

  3. #3

    Default

    Quote Originally Posted by geoffrobinson View Post
    Maybe there is something I'm overlooking, but as long as the database allows null values (and your Pentaho processes), you should be fine.
    Thanks for your help.

    I express myself incorrectly. In the process of inserting the row, I change the type from string to date (using Select values) and receive a error mesage ("couldn't convert string [ ] to date using format [yyyy/MM/dd]".

    Osmar Mateus

  4. #4

    Default

    I find that there is a space in your string [ ]. So you are not trying to convert null to date type, you are actually converting string space to date type.

    Check the data source and change the string " " to null or "" should solve the problem.

  5. #5
    Join Date
    Nov 2008
    Posts
    143

    Default

    Try setting the trim column to both in your Csv File Input fields definition tab.

  6. #6

    Default

    You are correct. It worked fine!

    Thanks

    Osmar

    Quote Originally Posted by Nan.Cloud2Land View Post
    I find that there is a space in your string [ ]. So you are not trying to convert null to date type, you are actually converting string space to date type.

    Check the data source and change the string " " to null or "" should solve the problem.

Tags for this Thread

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.