Previously used is PostgreSQL, because of the speed of the reason, so intends to unify the data into the HDFs, but a write to HDFs is very slow, all write to the local file and then to HDFs is also the same slow, so that this article, will be part of the first in the memory database, And then write to HDFs, so that the speed of data extraction and writing over several times! Well, tell me how to use H2 in kettle.
Download H2 First, click to download
I test the time under the Windows version, after decompression, execute H2/bin/h2.bat, after successful execution, will open the interface
The contents of the red box enter what you see below code
I first tried the memory mode, but after trying to find that the H2 support scenario for me does not apply, because the memory mode, requires all the links in a process, which is not realistic for kettle, if not to use, it can only create the statement of the table, And the module that uses the table is placed in a transform, such as
See, the top of the icon is a table statement, the following is inserted into the table data, must be used, put in the job is not valid, only in a transform, OK, see how we use Kettle to connect memory mode H2
Both of these methods can be connected to the memory mode of the H2, choose a use.
Let's talk about the embedded mode that fits my scene.
First look at the connection mode, only this connection
The advantage of using the embedded mode is that the module to create the table and the module can be in the two different transform, because the embedded mode is to write the data to the default hard disk, OK first write here, quick to try, what problem, direct message.
Using the in-memory database in Kettle H2