Not able to read data from MariaDB using Pentaho - mariadb

I connected to my database, testeddthe connection and it's working fine
when I run a simple query using the input table transformation I get this error:
37:11 - Table input.0 - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : Unexpected error
2022/12/13 11:37:11 - Table input.0 - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException:
2022/12/13 11:37:11 - Table input.0 - An error occurred executing SQL:
2022/12/13 11:37:11 - Table input.0 - SELECT * from patient limit 10;
2022/12/13 11:37:11 - Table input.0 -
2022/12/13 11:37:11 - Table input.0 - (conn=49) invalid fetch size
2022/12/13 11:37:11 - Table input.0 -
2022/12/13 11:37:11 - Table input.0 - at org.pentaho.di.core.database.Database.openQuery(Database.java:1776)
2022/12/13 11:37:11 - Table input.0 - at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:242)
2022/12/13 11:37:11 - Table input.0 - at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:143)
2022/12/13 11:37:11 - Table input.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2022/12/13 11:37:11 - Table input.0 - at java.lang.Thread.run(Thread.java:750)
2022/12/13 11:37:11 - Table input.0 - Caused by: java.sql.SQLSyntaxErrorException: (conn=49) invalid fetch size
2022/12/13 11:37:11 - Table input.0 - at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:282)
2022/12/13 11:37:11 - Table input.0 - at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:336)
2022/12/13 11:37:11 - Table input.0 - at org.mariadb.jdbc.Statement.setFetchSize(Statement.java:587)
2022/12/13 11:37:11 - Table input.0 - at org.pentaho.di.core.database.Database.openQuery(Database.java:1754)
2022/12/13 11:37:11 - Table input.0 - ... 4 more
2022/12/13 11:37:11 - Table input.0 - Finished reading query, closing connection
2022/12/13 11:37:11 - Table input.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)

Maybe running the query without the ";" at the end?

Related

while using SELECT query to convert BLOB to CLOB using to_clob getting ORA00932 error in oracle 11g

SELECT TO_CLOB(DATAFILE) FROM ARCHIVED WHERE ARCHIVED_PACK_ID = '123456'
DATAFILE -- is a BLOB column within table ARCHIVED
oracle version used : Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
Error Details:
Getting ORA-00932: inconsistent datatypes: expected CHAR got BLOB
00932. 00000 - "inconsistent datatypes: expected %s got %s"
*Cause:
*Action:
Error at Line: 1 Column: 16

Not able to import MariaDB dump file to Azure Maria DB

I m getting below error while importing database to Azure Maria DB through MySQl Workbench
ERROR 1064 (42000) at line 1746: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS (json_unquote(json_extract(json_object,'$.attribute_cod...' at line 6
Error

"RR_4036 Error connecting to database [[Teradata][ODBC Teradata Driver][Teradata Database]

ERROR : RR_4036 : Error connecting to database [
[Teradata][ODBC Teradata Driver][Teradata Database] The parcel stream is invalid.Unable to get catalog string.[Teradata][ODBC Teradata Driver] Unable to get catalog string.
Database driver error...
Function Name : Connect
Database driver error...
Function Name : Connect
Database Error: Failed to connect to database using user [EDW_AKRITIV_ETL] and connection string [Teradata_Prod_US].].
i am using informatica 9.6.1
and teradata 16.20

flywaydb : MView Refresh Failing

I am trying to refresh Materialised view using Flyway DB but below error coming
Help....is this supported or not?
Below SQL
ALTER MATERIALIZED VIEW TEST.TBL_M_V REFRESH COMPLETE ON DEMAND;
EXECUTE DBMS_MVIEW.REFRESH('TEST.TBL_M_V','C');
ALTER MATERIALIZED VIEW TEST.TBL_M_V NEVER REFRESH;
Below error coming
ERROR: Migration of schema "TEST" to version 4.1 failed! Please restore backu
ps and roll back database and code!
ERROR:
Migration V4_1__MViewRefresh_Test.sql failed
--------------------------------------------------
SQL State : 42000
Error Code : 900
Message : ORA-00900: invalid SQL statement
Location : C:/dev/flyway-3.1/sql/V4_1__MViewRefresh_Test.sql
Line : 8
Statement : EXECUTE DBMS_MVIEW.REFRESH('TEST.TBL_M_V','C')
As the error says, it is not a Flyway issue. The Oracle JDBC driver refused your statement.
This is the correct syntax you should use:
BEGIN
DBMS_MVIEW.REFRESH('TEST.TBL_M_V','C');
END;

Cannot select in SQLite database using Pentaho Data Integration : java.sql.SQLException: ResultSet closed

I'm trying to use a SQLite database to make a Table Input step in Pentaho Data Integration. Connection seems fine...
Connection to database [Volp_2] is OK.
Hostname : C:\Users\Aluno\Apps\VOLP\BD\volp.db
Port : -1
Database name : *****
... but previewing first 1000 rows through Table Input step
2014/05/26 11:18:14 - Table input.0 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : Erro inesperado
2014/05/26 11:18:14 - Table input.0 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException:
2014/05/26 11:18:14 - Table input.0 - An error occurred executing SQL:
2014/05/26 11:18:14 - Table input.0 - select nome from palavras
2014/05/26 11:18:14 - Table input.0 - [SQLITE_ERROR] SQL error or missing database (no such table: palavras)
2014/05/26 11:18:14 - Table input.0 -
2014/05/26 11:18:14 - Table input.0 - at org.pentaho.di.core.database.Database.openQuery(Database.java:1641)
2014/05/26 11:18:14 - Table input.0 - at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:233)
2014/05/26 11:18:14 - Table input.0 - at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:143)
2014/05/26 11:18:14 - Table input.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:60)
2014/05/26 11:18:14 - Table input.0 - at java.lang.Thread.run(Thread.java:724)
2014/05/26 11:18:14 - Table input.0 - Caused by: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such table: palavras)
2014/05/26 11:18:14 - Table input.0 - at org.sqlite.DB.newSQLException(DB.java:383)
2014/05/26 11:18:14 - Table input.0 - at org.sqlite.DB.newSQLException(DB.java:387)
2014/05/26 11:18:14 - Table input.0 - at org.sqlite.DB.throwex(DB.java:374)
2014/05/26 11:18:14 - Table input.0 - at org.sqlite.NativeDB.prepare(Native Method)
2014/05/26 11:18:14 - Table input.0 - at org.sqlite.DB.prepare(DB.java:123)
2014/05/26 11:18:14 - Table input.0 - at org.sqlite.Stmt.executeQuery(Stmt.java:121)
2014/05/26 11:18:14 - Table input.0 - at org.pentaho.di.core.database.Database.openQuery(Database.java:1630)
2014/05/26 11:18:14 - Table input.0 - ... 4 more
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : Something went wrong while trying to stop the transformation: org.pentaho.di.core.exception.KettleDatabaseException:
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - Error cancelling statement
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - ResultSet closed
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException:
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - Error cancelling statement
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - ResultSet closed
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App -
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.pentaho.di.core.database.Database.cancelStatement(Database.java:664)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.pentaho.di.core.database.Database.cancelQuery(Database.java:646)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.pentaho.di.trans.steps.tableinput.TableInput.stopRunning(TableInput.java:303)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.pentaho.di.trans.Trans.stopAll(Trans.java:1729)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.pentaho.di.trans.step.BaseStep.stopAll(BaseStep.java:2605)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:95)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at java.lang.Thread.run(Thread.java:724)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - Caused by: java.sql.SQLException: ResultSet closed
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.sqlite.RS.checkOpen(RS.java:63)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.sqlite.Stmt.cancel(Stmt.java:254)
2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - at org.pentaho.di.core.database.Database.cancelStatement(Database.java:659)
What am I doing wrong? Can anyone help me?
This is already covered at
https://gobansaor.wordpress.com/2006/12/18/sqlite-jdbc-and-kettle-pentaho-data-integration-etl/
Here are the steps in case that article is removed:
1. Within SPOON, make a new connection using for example a Table Input step.
2. In the General tab, pick “Generic database” from the list of connection types.
3. Pick “Native(JDBC)” from the Method of Access list.
No further information required on this tab, go to the Generic tab.
4. In the URL field, enter “jdbc:sqlite:c:\mydata\mydatabase.db” where c:\mydata\mydatabase.db is the SQLite database you wish to connect to.
5. In the Driver class field, enter “org.sqlite.JDBC”.
Previously the jar file including the JDBC class must be saved into the data-integration\lib folder.
Well this error looks like the cause:
select nome from palavras
Since it is complaining that the table does not exist...
Are you sure the table is spelled right or does it have a database name associated? If you connect directly with sqlite3 and run the query, does this query work?
I have the same issue, for me the correct answer is from Mario.Cadiz (sorry I don't have reputation for comments)
I've defined two connections, first with sqlite type and second for generic database.
sqlite type
Host Name: jdbc:sqlite:/home/jose/demo.db
Database Name: demo
port: <empty>
Username: <empty>
Password: <empty>
I've tested the connection correctly, but Explore function don't show any table
Generic database type
Dialect: Generic database
Custom connection URL: jdbc:sqlite:/home/jose/demo.db
Custom driver class name: org.sqlite.JDBC
Username: <empty>
Password: <empty>
Test and Explore functions are right, I can explore all tables in database.
PDI version 9.2.0.0-290 (Ubuntu 20.04)
The sqlite driver comes already installed with this version of pdi (lib directory)

Resources