Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: dbf encoding from XBASE input step

  1. #1

    Default dbf encoding from XBASE input step

    Hello All,

    I'm using XBase input to read dbf files and all is good except two quirky situations: 1) Boolean type fields return N/Y values instead of F/T; 2) Number fields with > 1 decimal place round values to tenths i.e. 3.47 converts to 3.5. Have specified the following character set names with same results. I see no other options to change that would affect the data streaming out of the input step. DBF Viewer 2000 confirms the Boolean and Number field values as what is expected, but not received.

    US-ASCII
    UTF-8
    ISO-8859-1
    windows-1252

    The Boolean data change is not a show stopper since it can be fixed with a replace. However, the rounded numeric values are more troublesome and need some resolution.

    Thanks in advance.

    PDI 5.3
    Windows 7

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    I'm willing to bet that it's not actually rounded, but is just the preview being strange.

    Use a select values step, and set the field format to #.##### rather than #.# (the default)
    We also usually recommend writing the data out to a Text File with Text File Output to verify what the data really looks like, rather than what Preview is showing.

  3. #3

    Default

    You were right on. Thanks for the Select Values suggestion.

  4. #4

    Default

    Now that the rounded numbers issue is resolved, does anyone have ideas on conversion of the Boolean values?

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

    Default

    You really should tell us what datatype you want to convert to and the mapping you would prefer.
    I would tell you about User-Defined-Java-Expression and the ternary operator, then, or about several other steps you could use.
    So long, and thanks for all the fish.

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.