Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Data Type Problem

  1. #1
    Join Date
    Feb 2011
    Posts
    6

    Default Data Type Problem

    Hallo Forum,

    I do a TABLE INPUT somewhere in a Datastream an use a Statement like this:

    Code:
    SELECT 
    count(*) as modell_possible_variante,
    concat(produkte.Modell_nr,'_',produkte.LiefFarbe) as modfarb_id
    FROM produkte 
    where tempgesamtlageracheck>0
    group by produkte.Modell_nr
    As next step I do a MERGE JOIN to insert modell_possible_variante and modfarb_id
    into the stream. modell_possible_variante has only INTEGER-Data.

    ... but working with Javascript little later in the stream, it indicates that modell_possible_variante is an sting. How can I change that?

  2. #2
    Join Date
    Aug 2008
    Posts
    563

    Default

    In general the easiest way to change the data type is by using the Select Values step: Click on the Meta-data tab and define the fields that you want to change the data type for.
    Also it is a good idea to first check what data type your field has when it enters the JavaScript step. Right click on the JavaScript step and choose Show input fields. If your field is still specified as integer at this point, you have most likely changed the data type definition of this field within your JavaScript (In this case, make changes to your JavaScript).
    Last edited by diddy; 03-02-2011 at 05:36 AM.
    Best regards,
    Diethard
    ===============
    Visit my Pentaho blog which offers some tutorials mainly on Kettle, Report Designer and Mondrian
    ===============

  3. #3
    Join Date
    Feb 2011
    Posts
    6

    Default

    thanxx ... danke ... its working

  4. #4
    Join Date
    Aug 2008
    Posts
    563

    Default

    Excellent!
    Best regards,
    Diethard
    ===============
    Visit my Pentaho blog which offers some tutorials mainly on Kettle, Report Designer and Mondrian
    ===============

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.