error while running talend code to access table under h2 database sche

One Star

error while running talend code to access table under h2 database sche

We have configured Talend admin console 4.1.2 using h2 database.
I am trying to extract data from the TABLE (USER) with in the SCHEMA - PUBLIC using component : tJdbcInput which is throwing error message as below
**********************************************************
org.h2.jdbc.JdbcSQLException: Table "USER" not found; SQL statement:
Select * from PUBLIC.USER
******************************
I am able to query this table from webconsole successfully.
I am using jdbc url as file based and classname as : "org.h2.Driver"
I am able to query tables from INFORMATION_SCHEMA but not able to query tables under PUBLIC schema
Community Manager

Re: error while running talend code to access table under h2 database sche

Hello
Try this query:
"Select * from PUBLIC.\"USER\""
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: error while running talend code to access table under h2 database sche

I have got similar error message if use above query.
tarting job hsqldb at 13:31 25/02/2011.
connecting to socket on port 3870
connected
Exception in component tJDBCInput_2
org.h2.jdbc.JdbcSQLException: Table "USER" not found; SQL statement:
Select * from PUBLIC."USER"
at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.schema.Schema.getTableOrView(Schema.java:383)
at org.h2.command.Parser.readTableOrView(Parser.java:4333)
at org.h2.command.Parser.readTableFilter(Parser.java:1001)
at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1529)
at org.h2.command.Parser.parseSelectSimple(Parser.java:1626)
at org.h2.command.Parser.parseSelectSub(Parser.java:1523)
at org.h2.command.Parser.parseSelectUnion(Parser.java:1368)
at org.h2.command.Parser.parseSelect(Parser.java:1356)
at org.h2.command.Parser.parsePrepared(Parser.java:395)
at org.h2.command.Parser.parse(Parser.java:278)
at org.h2.command.Parser.parse(Parser.java:250)
at org.h2.command.Parser.prepareCommand(Parser.java:222)
at org.h2.engine.Session.prepareLocal(Session.java:420)
at org.h2.engine.Session.prepareCommand(Session.java:381)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1070)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:70)
at eidemo.hsqldb_0_1.hsqldb.tJDBCInput_2Process(hsqldb.java:548)
at eidemo.hsqldb_0_1.hsqldb.runJobInTOS(hsqldb.java:1025)
at eidemo.hsqldb_0_1.hsqldb.main(hsqldb.java:896)
disconnected
Job hsqldb ended at 13:31 25/02/2011.
Community Manager

Re: error while running talend code to access table under h2 database sche

Hi
It is case-sensitive, i try
"SELECT * FROM \"user\""
and it works.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: error while running talend code to access table under h2 database sche

I tried
"select * from public.\"user\""
"Select * from public.\"user\""
"Select * from PUBLIC.\"user\""
ITS THE SAME ERROR MESSAGE AS TABLE NOT FOUND.
Community Manager

Re: error while running talend code to access table under h2 database sche

Hi
Are you using the embedded H2? Why you add the schema 'public'?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: error while running talend code to access table under h2 database sche

Shong
I have provided you screen shots and our login details in mail to shong@talend.com
Please check.
We are using h2(embeded) and I am able to query data successfully
One Star

Re: error while running talend code to access table under h2 database sche

We are able to query data successfully in H2console but not thru talend program.
id/password are default values . tisadmin
One Star

Re: error while running talend code to access table under h2 database sche

hi Shong
Any update on this issue.
This is impacting our development work.
Appreciate your quick response.
Thanks
Gayathri B
Community Manager

Re: error while running talend code to access table under h2 database sche

Hi
- Open the SQL builder and see if it works in SQL builder.
- Which mapping file do you choose when you create connection metadata?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business