Nifi docker installation - apache-nifi

I'm just new to Nifi. I was able to install Nifi and see it in webbrowser. Now as next step i want to connect to sql server, nevertheless it seems i have to install jdbc as well and here is my issue when i look at tutorials all referencing to something called "docker" and advising to install jdbc from there. When i go into cmd and type docker cmd not recognize it. Can anyone tell me how to install it and what it is?

There is no need of docker for this use case.
All you have to do is download and install SQL server from official downloads page, if you don't have server setup.
Installation guide - https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server?view=sql-server-2017
You also need to download jar file which has JDBC driver stuff - https://learn.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server?view=sql-server-2017
In NiFi, you can use PutDatabaseRecord processor to insert/update/delete rows from table. This processor internally uses DBCPConnectionPool controller services to get database connections.
DBCPConnectionPool controller service requires below properties to be set.
Database connection url - jdbc:sqlserver://localhost:1433;databaseName=dbname
Driver class name -
com.microsoft.sqlserver.jdbc.SQLServerDriver
Driver (jar) location -
/tmp/sqlserver.jar (Example only)
PutDatabaseRecord Processor
DBCPConnectionPool controller service

I think you may want to google how to install Docker and what it is, it's already explained in many places.

Related

JMeter, MSSQL, JDBC, and Integrated Security with sqljdbc_auth.dll

Notwithstanding this question, I still have not determined the error in my configuration causing the JMeter JDBC sampler to reject integrated security.
Downloaded the SQL Server JDBC package for x64 and installed mssql-jdbc-9.4.1.jre8.jar in JMETER_PATH\lib.
Installed mssql-jdbc_auth-9.4.1.x86.dll in JMETER_PATH\lib, too, but, as advised on the Blazemeter comments, I also installed it in C:\windows\system32, since it is on my java.library.path.
Restarted JMeter.
Still getting the error in the Response:
Cannot create PoolableConnectionFactory (This driver is not configured for integrated authentication. ClientConnectionId:9c225a40-362d-4aba-8339-cfab9270048f)
JMeter version is 5.4.1.
Updating with screenshot showing os.arch, java.library.path, and placement of the DLL.
Database URL: jdbc:sqlserver://myservername:1433;integratedSecurity=true
Add a Debug Sampler to your Test Plan and configure it like:
Look for os.arch property, it should be amd64 or x86_64, if it isn't - geta 64-bit Java SDK
Look for java.library.path property, copy the mssql-jdbc_auth-9.4.1.x64.dll library to one of the folders which are in the java.library.path
Restart JMeter to pick up the .dll
Make sure that integratedSecurity=true stanza is in your JDBC URL like
jdbc:sqlserver://somehost:1433;integratedSecurity=true

Create an H2 Database from the console

I would like to run H2 on my local host (Windows), and create a new database.
To do so, I have dowloaded the zip file from http://www.h2database.com/html/main.html, unzipped it, then run the bin/h2.bat script. I have not used the windows installer, as the machine I will be running later on does not grant me installation privileges.
The console was successfully opened on the 8082 port, but I could not create any database, failing with Database "C:/Users/PC/test" not found [90013-198] 90013/90013. I have tried many variations, to no avail.
The documentation states that a database should be created automatically if it does not exist, but indicates it cannot be done so from the H2 console (http://www.h2database.com/html/tutorial.html#creating_new_databases).
However, the documentation does not provide an alternate way to create a database, either by running the jar with additional parameters, or by another utility.
I feel pretty dazed right now. How do I properly create a new database in H2? I would like a normal database, persisted on disk, not an in-memory one.
I would suggest that this does not work in version 198
You could download an older version (I used 196) to create the databse and then switch back to 198 to open the database.
I have managed to run it by using the following command line:
java -cp h2-1.4.198.jar org.h2.tools.Server -tcp -pg -web
I must have missed something in the documentation, sorry about this.

Mule Connect to remote flat files

I am new to Mule and I have been struggling with a simple issue for a while now. I am trying to connect to flat files (.MDB, .DBF) located on a remote desktop through my Mule application using the generic database connector of Mule. I have tried different things here:
I am using StelsDBF and StelsMDB drivers for the JDBC connectivity. I tried connecting directly using jdbc URL - jdbc:jstels:mdb:host/path
I have also tried to access through FTP by using FileZilla server on remote desktop and using jdbc URL in my app - jdbc:jstels:dbf:ftp://user:password#host:21/path
None of these seem to be working as I am always getting Connection exceptions. If anyone has tried this before, what is the best way to go about it? Connecting a remote flat file with Mule? Your response on this will be greatly appreciated!
If you want to load the contents of the file inside a Mule flow you should use the file or FTP connector, i don't know for sure about your JDBC option.
With the File connector you can access local files (files on the server where mule is running), you could try to mount the folders as a share.
Or run an FTP server like you already tried, that should work.
There is probably an error in your syntax / connection.
Please paste the complete XML of your Mule flow so we can see what you are trying to do.
Your usecase is still not really clear to me, are you really planning to use http to trigger the DB everytime? Anyway did you try putting the file on a local path and use that path in your database url. Here is someone that says he had it working, he created a separate bean.
http://forums.mulesoft.com/questions/6422/setting_property_dynamically_on_jdbcdatasource.html
I think a local path is maybe possible and it's better to test that first.
Also take note of how to refer to a file path, look at the examples for the file connector: https://docs.mulesoft.com/mule-user-guide/v/3.7/file-transport-reference#namespace-and-syntax
If you manage to get it working and you can use the path directly in the JDBC url, you should have a look at the poll scope.
https://docs.mulesoft.com/mule-user-guide/v/3.7/poll-reference
You can use your DB connector as an inbound endpoint when wrapped in a poll scope.
I experienced the same issue when connect to Microsoft Access Database (*.mdb, *.accdb) using Mule Database Connector. After further investigation, it's solved by installing Microsoft Access Database Engine
Another issue, I couldn't pass parameter to construct a query as same as I do for other databases. e.g.: SELECT * FROM emplcopy WHERE id = #[payload.id]
To solve this issue:
I changed the Query type from Parameterized into Dynamic.
I generated the query inside Set Payload transformer (generate the query in form of String, e.g.: SELECT * FROM emplcopy WHERE id = '1').
Finally, put it into the Dynamic query area: #[payload]

Cassandra Db in windows 7 xampp

I need to store stock market data and stock graph datas for my site . so i am selecting two db's mongo and cassandra and i finalize cassandra db, i am using windows 7 , Xampp and i need to use this in yii. i am installing data stack it is working in cli and its also working in (localhost:8888) . so now how can i connect it in yii site .
Is this requirement solvable? I need the steps to connect. Because diffrent site tells the different solution.
Thanks in advance
You need to connect a client to your php framework
PDO driver - https://code.google.com/a/apache-extras.org/p/cassandra-pdo/
A popular php driver - https://github.com/thobbs/phpcassa
The pdo driver also supports CQL, which is good if you are just getting started.
note The project appears to be dead, but there is a github fork of it with recent updates: https://github.com/Orange-OpenSource/YACassandraPDO
phpcassa has lots of examples on how to get started in the github page. One thing to be aware of is that the example lists super columns, try to stay away from supper columns as they are somewhat deprecated.
The final option is to set up your cassandra server and host it inside of a webserver which can be queried (for example via rest) and this will give you access to more powerful java drivers, although the php drivers above should do the job.

Adding a jdbc driver to pentaho design studio and configuring the datasource

I've just integrated pentaho's design studio into the BI server. Does anyone know how to add mysql jdbc drivers. I need to connect in order to define the relational action process.
In my research I found:
http://wiki.bizcubed.com.au/xwiki/bin/view/Pentaho%20Tutorial/Install%20Pentaho%20Design%20Studio#Comments
which specifies selecting
JDBC Driver, Edit, Extra Class Path from Preferences but no such preference exists,
http://forums.pentaho.com/showthread.php?85148-Design-Studio-xaction-database-connection-dropdown-list-empty&highlight=add+jdbc+driver+to+design+studio
which resulted in me creating a jdbc folder in which I placed the drivers in plugins\org.pentaho.designstudio.editors.actionsequence_4.0.0.stable\lib\
but just as the author of the thread I'm stuck
http://forums.pentaho.com/showthread.php?53303-Create-a-new-datasource&highlight=add+jdbc+driver+to+design+studio
suggests that:
3. If you are using the Pentaho DesignStudio you have to copy your jdbc (JAR files) to the plugins directory (in pentaho plugin) so you can develop, deploy and run your applications. This apply also to eclipse plugin (If you have now an Eclipse).
Which resulted in me placing the jar files in the plugin directory to no avail.
http://forums.pentaho.com/showthread.php?53715-Can-t-add-new-datasource-GA-version&highlight=add+jdbc+driver+to+design+studio
talks of a directory, rdw which does not exist
Any form of assistance will be greatly appreciated.
You have to configure the datasource by adding a Relational Process Action to your .xaction in the Pentaho Design Studio wherein you can specify the JDBC Driver, Username, Password and the Database URL. But first you have to put your MySQL JAR file in your lib folder /path/to/biserver-ce/tomcat/lib
You will also have to save your *.xaction file/s in the pentaho-solutions folder /path/to/biserver-ce/pentaho-solutions in order for your *.xaction files to connect to the database which you have assigned in your Relational Process Action.
I encountered the same problem and solved as follow
place mysql-connector-java-5.1.17.jar under (bi server path)\tomcat\lib\ folder
start Pentaho Admin Console (PAC) http://127.0.0.1:8099 with
user: admin
password: password
and add a connection there
use the name of the connection just created for action sequence as JNDI
The problem solved for me.

Resources