Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Postgresql identifiers need double quotes

  1. #1
    Join Date
    Feb 2007
    Posts
    7

    Default Postgresql identifiers need double quotes

    When "exploring" a database over a Postgresql connection, using Kettle 2.5 GA/Java 1.6, Kettle fails on schemas and tables that have mixed case. This appears to be because the query generated in Kettle does not put the required double quotes around the schema name and the table name, e.g., > select * from "SchemaName"."TableName".

    This produces errors such as the following:
    java.lang.reflect.InvocationTargetException: Problem encountered determining query fields: be.ibridge.kettle.core.exception.KettleDatabaseException:
    Couldn't get field info from [SELECT * FROM SchemaName.TableName limit 1]
    Location: exec query
    ERROR: schema "schemaname" does not exist

    at be.ibridge.kettle.core.dialog.GetQueryFieldsProgressDialog$1.run(GetQueryFieldsProgressDialog.java:78)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    Caused by: be.ibridge.kettle.core.exception.KettleDatabaseException:
    Couldn't get field info from [SELECT * FROM SchemaName.TableName limit 1]
    Location: exec query
    ERROR: schema "schemaname" does not exist

    at be.ibridge.kettle.core.database.Database.getQueryFields(Database.java:2725)
    at be.ibridge.kettle.core.database.Database.getQueryFields(Database.java:2277)
    at be.ibridge.kettle.core.dialog.GetQueryFieldsProgressDialog$1.run(GetQueryFieldsProgressDialog.java:70)
    ... 1 more
    Caused by: org.postgresql.util.PSQLException: ERROR: schema "schemaname" does not exist


    Thanks,
    Murthy

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Well..

    1) raise a bugtracker for it at http://jira.pentaho.org/browse/PDI . something similar was logged recently http://jira.pentaho.org/browse/PDI-59 but it's not 100% the same.

    2) If it's your own application/DDL ... consider changing them all to use lower case... or be prepared to be "bitten" a couple of more times by different tools

    Regards,
    Sven
    Last edited by sboden; 08-21-2007 at 03:59 PM.

  3. #3
    wgorman Guest

    Default

    Here is another JIRA case that is relevant:

    http://jira.pentaho.org/browse/PMD-91

    I've added a special flag to the db dialog that forces all columns to be quoted. This code has been checked in to SVN, but hasn't made it out in a release yet.

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.