Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: How to specify the Enclosure or Quote for the text file in Green Plum Load Step ???

  1. #1
    Join Date
    Dec 2010
    Posts
    193

    Question How to specify the Enclosure or Quote for the text file in Green Plum Load Step ???

    Hi,

    When I tried loading into GP with the help of GP Load step, I have set the delimiter as ; or , or tab . But none of them worked, since there is no way to force enclosure on the text file as my data has all the delimiters present . So it throws an error. How to rectify this ???

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

    Default

    When there is no character left to be used as delimiter, you will have to escape the delimiter characters that are part of the field values.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Dec 2010
    Posts
    193

    Default

    Thanks marabu. But can you help me how to do that ?

  4. #4
    Join Date
    Dec 2010
    Posts
    193

    Default

    Now I have used '|' as delimiter, but now it is saying as data formatting error.I am attaching the files for your reference. As please find the table structure inside the load text file.
    Attached Files Attached Files

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

    Default

    gpload should be able to tell you more about the problem, so check its log files.
    You can test without PDI using gpload directly.

    If it's a large amount of data, you should read about the Greenplum external table feature.
    So long, and thanks for all the fish.

  6. #6
    Join Date
    Dec 2010
    Posts
    193

    Exclamation

    After further analysis , I found that , the error occurs due to the null values . For Example,
    I have category column in target with numeric data , but the data in text file is coming as blank instead of null . Also there is no enclosure or replace null values which can be provided inside the automatically configured GP configuration file
    .So the error occurs....

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

    Default

    The Greenplum Database Administrator Guide has information on how to correctly represent null values in a CSV data file.
    So long, and thanks for all the fish.

  8. #8
    Join Date
    Dec 2010
    Posts
    193

    Default

    Cheers. That helped me in other way. I checked the Manual loading option in GP Load step. After the creation of control file , I altered the control file with option NULL_AS : '' . and ran GPLoad manually. It got inserted. Now need to find a way to automatically update the generated YAML file with the above mentioned value and then we can call gp load inside UNIX Shell Script command
    ....

    Thanks
    Satran

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.