Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Table Input - unable to retrieve fields from hive table

  1. #1
    Join Date
    Jan 2017
    Posts
    6

    Default Table Input - unable to retrieve fields from hive table

    Hello PDI experts,

    I am new to PDI and I'm using PDI 7.

    My data table is from Hive, connected well.

    When I try to read in fields from a hive table with a Table Input step I get the error like this:

    Col_agrmt - Unexpected error
    Col_agrmt - org.pentaho.di.core.exception.KettleDatabaseException:
    Couldn't get row from result set


    Unable to get value 'Integer(15)' from database resultset, index 5
    [Cloudera][JDBC](10140) Error converting value to long.


    The code I'm using is:

    select
    col_agrmt_sk,
    cdcc_id,
    db_ety_brch_cd as BKG_DB_ETY_ID,
    col_agrmt_id,
    col_agrmt_src_nme,
    grc_col_typ as grc_pdt


    from table
    where period = '${period_itables}'


    order by col_agrmt_sk

    Do you have any clues what the problem is and how to fix it?

    Many thanks in advance.

    Thanks
    Marta

  2. #2
    Join Date
    Nov 2009
    Posts
    688

    Default

    Do you get data without the where statement?
    When so period is not of the same type as ${period_itables}. One of them is an integer and the other a number

  3. #3
    Join Date
    Jan 2017
    Posts
    6

    Default

    period field is a string and ${period_itables} is a variable defined in Set Variables.. step.

    The data preview works fine, the error populates when running the job.

    Any ideas?


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

    Default

    Quote Originally Posted by otkubek View Post
    ${period_itables} is a variable defined in Set Variables.. step.
    You cannot set and use variables in the same transformation.

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.