-->

Monday 12 April 2010

QRCode encoder with Kettle : new plugin

Hi all,

I’ve made a new Kettle plugin to answer to a specific need from one of my clients in retail industry : a QRCode encoder.

What is a QrCode ?

It is a matrix code created by Denso Wave, a japanese company. QR stands for “quick response” because of the high speed decoding process. Today, most of our mobile phones (ex : iPhone) can read (decode) these QRCodes and read the information within to feed an application (agenda, adress book …). Some companies use it for encoding inside a logistic process. These codes are also widely used in ads. More infos HERE.

image

One of the code above is mine. But which one ?

The Kettle plugin

I used the famoux ZXING java library to encode any data into a QRCode. This library is quite complete and powerfull, yet sometimes a bit difficult to install and understand (read the wiki). You can find it HERE.

The plugin is quite simple : a single screen holds all the needed informations.

image Here are the fields :

  • Step name : the step name.
  • QRColumn : the column you want to encode, coming from a previous step.
  • Size x : the X size of your generated QRCode file (recommanded : 128).
  • Sixe y : the Y size of your generated QRCode file (recommanded : 128).
  • Picture format : png or gif
  • Destination dir : the destination directory where all the pictures / QRCodes will be written.

Running the Plugin

Very simple. Have a look below to my sample transformation. A data input coming from a csv file (can be a query or anything else) and the plugin itself. The plugin will read all the incoming data from the QRColumn you specified and will create a file for each value. The generated files will have the same name but will have a counter in the filename, corresponding to the rownumber.

image

The generated files, from my examples, are now on my C:\, as specified in the plugin window.

image

I want it !

Ok, no problem, you can find the package HERE. As usual, everything is compiled with fat jar in order to have only one jar file. The package holds :

  • The plugin itself (+ xml file and icon file),
  • The data sample csv file,
  • My QRCode, to add me to your favorites ;)

Don’t forget to have a look to Pentaho and the new Kettle / PDI release 4.

Have fun and keep me informed about your usage / testing or new feature request.

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.