Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: Can I change the format for numeric data types?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2014
    Posts
    7

    Question Can I change the format for numeric data types?

    The quick version:
    I'd like to change the format for numerics that are being written to a flat file, but don't have a static layout that would allow me to use field formats or "Select values" to make format modifications. Does anyone have suggestions?

    The less quick version:
    I have a bulk loading job that supports loading multiple tables into a Vertica database. The job uses a Table input step to retrieve the data.
    This Table input step uses the following query to obtain the source data:
    Code:
    SELECT * FROM ${SCHEMA}.${TABLE};
    The source data then moves to a "Text file output" where the numeric data is getting a '#.#' format applied. (Note: The Fields tab on the "Text file output" is where I would normally apply the format in a static, single table scenario, but due to the dynamic nature of this job, the fields are intentionally left blank.)

    I was counting on the metadata to specify data types for each column and this seems to work well enough with the exception that numeric fields are getting an incorrect format applied. I am now looking for ways to either dynamically change the format of columns based on the metadata being supplied by the source database, or to change the default #.# format for all numeric data being written.

    Does anyone have suggestions?

    Thanks very much,
    Darin

  2. #2
    Join Date
    Sep 2007
    Posts
    834

  3. #3
    Join Date
    Jun 2014
    Posts
    7

    Default

    Thanks very much for the guidance Maria.

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

    Default

    If you switch off output formatting in your Text File Output step, you should be fine.
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Jun 2014
    Posts
    7

    Default

    Thanks marabu.

    I'm going to test out the "Fast data dump (no formatting)" option in the Content tab.

    Much appreciated!
    -Darin

  6. #6
    Join Date
    Jun 2014
    Posts
    7

    Default

    Quote Originally Posted by Darin View Post
    I'm going to test out the "Fast data dump (no formatting)" option in the Content tab.
    I gave it a try, but unfortunately the results were the same as before.

    Thanks again for the suggestion though!

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.