Install driver in Pentaho Data Integration - kettle

i have problems connecting to an Oracle Database, i´ve configured the connection but it says:
Error connecting to database [_____] :org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
Driver class 'oracle.jdbc.driver.OracleDriver' could not be found, make sure the 'Oracle' driver (jar file) is installed.
oracle.jdbc.driver.OracleDriver
at org.pentaho.di.core.database.Database.normalConnect(Database.java:472)
at org.pentaho.di.core.database.Database.connect(Database.java:370)
at org.pentaho.di.core.database.Database.connect(Database.java:341)
at org.pentaho.di.core.database.Database.connect(Database.java:331)
I´ve downloaded the driver but i don´t know where to put it. I can´t find any lib-ext folder.
Any ideas?

Put your driver into de data-integration/lib folder.

put this driver in lib folder you can find the path of lib folder as data-integration/lib

Related

Build message: Cannot open include file: 'msoledbsql.h': No such file or directory

My project can't finish build process because I constantly have this error during Visual Studio build: Cannot open include file: 'msoledbsql.h': No such file or directory
I have 'msoledbsql.h' file included in one of the header files.
Does anyone know the solution of this issue?
After a long research of this issue I found that I've missing msoledbsql.h file on my machine.
The solution for this is to install Microsoft OLE DB Driver for SQL Server. We can find the driver on official Microsoft site Microsoft OLD DB Driver for SQL Server and choose the one suitable for your system architecture (x64 or x86).
Very important thing during the installation process is to select both options
OLE DB Driver 19 for SQL Server
OLE DB Driver 19 for SQL Server SDK
That should solve the issue.

Connect Tableau to Athena on Mac OS

Tableau Version 2021.1.2
Java Version
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
I placed the driver under ~/Library/Tableau/Drivers, but consistently getting the error message as shown in the attachment.Error Message from Tableau Desktop
I think that you are placing drivers in the wrong folders, you have to copy the .jar file inside the folder
C:\Program Files\Tableau\Drivers
If it doesn't exist you have to create it.
From the Tableau Drivers download page:
Follow these steps to install the JDBC driver for Amazon Athena on
your Windows computer:
Download the JDBC driver (.jar file) from the Amazon Athena User Guide
on Amazon's website. Move the downloaded .jar file to C:\Program
Files\Tableau\Drivers.
Try putting it as
/Users/<username>/Library/JDBC/AthenaJDBC42.jar
Try to unhide the hidden folder from the account which you mainly sign in from your Mac because there is a hidden Library folder where you would need to put the appropriate jar file in that's located in the folder.
My url was Computer/MacintoshHD/Users/myusername/Library
This is the Library directory where I pressed shirt+command+. to unhide it. There, you should be able to find an already created Tableau Folder which contains another directory known as Driver. You would need to place the appropriate jar file in the Driver folder.
Hope this helps!

How to access SQL server from linux c++ application?

We have a Microsoft Sql 2014 database on a remote windows server. I am trying to develop a QT GUI app which connects to this database. The app is in Linux/c++ environment. I tried using QtSql APIs to connect to that database.
bool MainWindow::connect()
{
QSqlDatabase db=QSqlDatabase::addDatabase( "QODBC" );//I am not sure if I am calling this correctly
db.setHostName("III");
db.setDatabaseName("YYY");
db.setUserName("YYY");
db.setPassword("XX");
bool ok = db.open();
if(ok==true)
{
QSqlQuery query;
query.exec("SELECT * FROM Subjects");
while (query.next())
{
int phy = query.value(0).toInt();
int chem = query.value(1).toInt();
ui->lineEdit_2->setText(QString::number(phy));
ui->lineEdit_3->setText(QString::number(chem));
}
}
else
{
qDebug()<<db.lastError();
}
return ok;
}
Its giving me error as :
QSqlDatabase: QODBC driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
QSqlError("", "Driver not loaded", "Driver not loaded")
I tried exporting the path of sql drivers to my Qt project.Still it didn't work.Then I read some articles and found that I need mssql-tools as well as ODBC Driver on my Linux box. I tried installing this based on this website:
https://blogs.msdn.microsoft.com/sqlnativeclient/2016/10/20/odbc-driver-13-0-for-linux-released/
and found that this won't work on my linux box (14.04 ubuntu) but only on 15.10 & 16.04.
The following packages have unmet dependencies:
mssql-tools :
Depends: libc6 (>= 2.21) but 2.19-0ubuntu6.9 is to be installed
Depends: libstdc++6 (>= 5.2) but 4.8.4-2ubuntu1~14.04.3 is to be installed
Depends: msodbcsql (>= 13.1.0.0) but it is not going to be installed
Depends: msodbcsql (< 13.2.0.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Then I used docker from here:
https://hub.docker.com/r/taylorbarrick/mssql-server-linux-tools/
I could install it successfully but when I am running
$docker run -t taylorbarrick/mssql-server-linux-tools sqlcmd -d <dbname> -H <host> -U <username> -P <password>
I am getting errors again.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
However,when using visual interface I can connect to sql database.Please help.
Doing what you want is definitely possible but slightly tricky. Here is my short guide for that (personally, I solved this quest with help of unixodbc and freetds. They works fine, although, msodbc could be used too, the general idea will be same).
Firstly, the errors you got (QSqlDatabase: QODBC driver not loaded) means that you don't have Qt's ODBC driver. So you have to build it from Qt sources. Run MaintenanceTool to make sure that sources for your version of Qt are installed within Qt's directory. Then read carefully documentation about building SQL drivers and details of usage ODBC. The batch you need is following:
cd $QTDIR/qtbase/src/plugins/sqldrivers/odbc
qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc"
make
Secondly, in GNU/Linux environment you need unixodbc, tdsodbc, freetds-bin packages (the names for Debian Jessie, they may be different in your particular distribution). I also recommend you to read MANs from these packages. Freetds driver must be "installed" into unixodbc. Following command will do the job (again, in Debian Jessie):
odbcinst -i -d -f /usr/share/tdsodbc/odbcinst.ini
Next, you should supply correct connection string to QSqlDatabase instance (via the QSqlDatabase::setDatabaseName call). Also, make sure that the type of database is QODBC (you code is correct at this point). You can't pass usernames, password and etc via regular calls of QSqlDatabase (i.e. QSqlDatabase::setDatabaseName, QSqlDatabase::setPassword and etc won't work). They must be included into connection string which should looks something like that:
DRIVER={freetds};SERVER=192.168.55.55;PORT=1433;DATABASE=YYY;UID=YYY;PWD=XX
Obviously, you should put correct IP or host name and other parameters. Also, freetds must replaced with correct driver name (it stored within the unixodbc configuration file). There is a handy site which generates connection string. Also there is a reference for connection string format at MSDN.
Finally, MS SQL Server and instance of you DB must be properly configured. Make sure that MS SQL Server accepts TCP connections and bound to correct ports (and addresses!). Also, you should set correct "Authentication Mode" for both SQL Server and instance of DB: it is "Windows Authentication only" by default but to connect via freetds it must allow "SQL Server Authentication".
Probably something else need to be tweaked. Read docs and logs carefully.
Added: I've just read about driver supplied by MS. The overall process is same, but instead freetds you should use this MS driver (i.e. "install" it into unxiodbc via odbcinst or manually into config and put correct driver name and other parameters into connection string). Anyway, Qt driver for ODBC wraps around unixodbc, so, it cannot be avoided.
To use MSSql server, you may have to install Microsoft's version of ODBC (msodbc) rather than unixodbc because... Microsoft. You can download it at https://www.microsoft.com/en-us/sql-server/sql-server-vnext-including-Linux.
Once you have that, you can access MSSql databases via ODBC. It is buggy and Whenever it updates, it may fail so you have to remove and reinstall both the library and the dev package.

Connecting Qt5 and Firebird 2.5

I'm a newbie at c++ linking and databases, so may be i'm asking a really stupid question. Anyway, i'm trying to access to firebird database using Qt5 for Windows. I've checked google and found 2 ways of doing so:
build ibase driver from Qt source;
use firebird through ODBC driver.
Software versions
I'm using latest version of Qt: 5.1.1. Firebird 2.5 is working ok: i've create a test_base and test user admin. Administartion of test_base i've done through FlameRobin.
Building
I've downloaded qt5.1.1 source and unpacked it in c:/devtools/qt5.1.1-src. Since Qt4.7-4.8 folder and project structure has been changed so old FAQs cannot be applied here. So i tried to build sql.pro from qtbase\src\sql folder with 2 lines added:
INCLUDEPATH+= C:/devtools/firebird/firebird_2_5/include
LIBS+= C:/devtools/firebird/firebird_2_5/lib/fbclient_ms.lib
And i've added C:/devtools/firebird/firebird_2_5/lib/ and C:/devtools/firebird/firebird_2_5/include in system PATH. Compilation is done without any error and i get a qt_pch.h.gch\c++ file in build dir. And i have no idea what's to do next, because i hoped to have bunch of .a and .dll files or bunch of error at least.
Using ODBC driver
I've downloaded and installed firebird ODBC driver from here. Installation was successful and i created ODBC DSN source mydb in Windows ODBC manager. Test connection button from ODBC configurator says that everything is ok.
Next thing i did was opening SQL Browser example from Qt Creator. And it fails to open my ODBC base with following parameters:
Driver: QODBC
Database Name: mydb
Username: admin
Password: admin
Hostname: localhost
Port: Default
And i get an error message: "[ODBC Firebird Driver] Unable to connect to data source: library 'C:\devtools\Firebird\Firebird_2_5\bin\fbclient.dll' failed to load QODBC3: Unable to connect".
I'm looking for resolving any of this two issues. Thanks in advance.
upd: i've connected firebird database through ODBC: the error was in using x64 database with x86 QODBC. Nota bene: in order to manage x86 DSN ODBC in x64 Windows 7 one must run ODBC manager from %WINDIR%\SysWOW64\odbcad32.exe NOT from Administration Panel as it explained here.
But what about building ibase from qt source?

Can't deploy Qt application with QMYSQL

I have an application that requires to connect to MySQL database, I am using Qt 4.7. I built the QMYSQL plugin and everything works just fine ON MY MACHINE. When I tried to test the application on another machine with the folder "sqldrivers" contains the "qsqlmysql4.dll" next to my executable. I get this error "Driver not loaded". After hours of searching the web and following the Qt documentation I came up with nothing.
Please tell me what am I missing.
Is there an actual mysql client DLL (like libmysqlclient.dll or something) that's installed on your machine, and also needs to be included with the app?