Skip to content

Instantly share code, notes, and snippets.

@mattyb149
mattyb149 / applescript_infield.xml
Created March 2, 2015 19:46
PDI SuperScript using AppleScript with incoming field values (applescript_infield.ktr)
<?xml version="1.0" encoding="UTF-8"?>
<transformation>
<info>
<name>applescript_infield</name>
<description/>
<extended_description/>
<trans_version/>
<trans_type>Normal</trans_type>
<directory>&#x2f;</directory>
<parameters>
@mattyb149
mattyb149 / settings.xml
Created May 13, 2015 15:33
settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<profiles>
<profile>
<id>pentaho</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
@mattyb149
mattyb149 / postal_code.ktr
Created July 8, 2015 04:20
Get Postal Code from Google Places
<?xml version="1.0" encoding="UTF-8"?>
<transformation>
<info>
<name>postal_code</name>
<description/>
<extended_description/>
<trans_version/>
<trans_type>Normal</trans_type>
<directory>&#x2f;</directory>
<parameters>
@mattyb149
mattyb149 / gist:3669583
Created September 7, 2012 21:00
PDI UDJC code for Google Docs Fusion Table Input step
import com.google.gdata.client.ClientLoginAccountType;
import com.google.gdata.client.GoogleService;
import com.google.gdata.client.Service.GDataRequest;
import com.google.gdata.client.Service.GDataRequest.RequestType;
import com.google.gdata.util.AuthenticationException;
import com.google.gdata.util.ContentType;
import com.google.gdata.util.ServiceException;
import java.io.BufferedReader;
import java.io.IOException;
@mattyb149
mattyb149 / gist:3724213
Created September 14, 2012 19:36
PDI UDJC code to get Step Plugin info
import org.pentaho.di.core.plugins.*;
import org.pentaho.di.core.row.*;
import java.util.List;
String type;
String id;
String name;
String description;
String libraries;
String imagefile;
@mattyb149
mattyb149 / gist:3726209
Created September 15, 2012 03:10
UDJC PDI step acting as Input generator
import org.pentaho.di.core.plugins.*;
import org.pentaho.di.core.row.*;
import java.util.List;
String type;
String id;
String name;
String description;
String libraries;
String imagefile;
@mattyb149
mattyb149 / gist:3757784
Created September 20, 2012 19:17
Create Reproduction Transformation step for Pentaho Data Integration
import org.pentaho.di.core.gui.Point;
import org.pentaho.di.core.plugins.*;
import org.pentaho.di.core.row.*;
import org.pentaho.di.trans.TransHopMeta;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.StepMetaInterface;
import org.pentaho.di.trans.steps.datagrid.DataGridMeta;
import org.pentaho.di.ui.spoon.Spoon;
import java.util.ArrayList;
@mattyb149
mattyb149 / merge_helper.groovy
Created January 13, 2013 23:15
A simple helper script to show how changes to files in the old PDI/Kettle project structure will map to the new project structure.
def module_map = ['src-core':'core/src',
'src-db':'db/src',
'src-dbdialog':'dbdialog/src',
'src':'engine/src',
'src-jdbc':'jdbc/src',
'src-ui':'ui/src',
'src-plugins':'plugins',
'libext':'lib',
'ui':'assembly/package-res/ui']
@mattyb149
mattyb149 / gist:6937603
Created October 11, 2013 16:14
error during subfloor migrate
remote: /usr/lib/ruby/1.8/pathname.rb:441:in `lstat': No such file or directory - /data/repositories/b/nw/b1/17/bin (Errno::ENOENT)
remote: from /usr/lib/ruby/1.8/pathname.rb:441:in `realpath_rec'
remote: from /usr/lib/ruby/1.8/pathname.rb:474:in `realpath'
remote: from -e:1
To https://github.com/pentaho/subfloor
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/pentaho/subfloor'
@mattyb149
mattyb149 / ExecuteScriptHelloWorldGroovy.xml
Created February 10, 2016 18:43
Hello World example for NiFi ExecuteScript processor (with Groovy)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><template><description>This is a self-contained example of using a Groovy script in an ExecuteScript processor to update the filename attribute of an incoming flowfile. A dummy JSON file is created (which is overkill for this instance, but is included to encourage playing around with the processor)</description><name>ExecuteScriptHelloWorldGroovy</name><snippet><connections><id>09e8aa98-c9b8-43f0-afbd-513f1d417061</id><parentGroupId>67fb1165-c100-47df-bde3-aa0a4f57af67</parentGroupId><backPressureDataSizeThreshold>0 MB</backPressureDataSizeThreshold><backPressureObjectThreshold>0</backPressureObjectThreshold><destination><groupId>67fb1165-c100-47df-bde3-aa0a4f57af67</groupId><id>8e8aa799-d1ab-4f97-ab35-b06a5a104ae2</id><type>PROCESSOR</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>success</selectedRelationships><source><groupId>67fb1165-c100-47df-bde3-aa0a4f57af67</groupId><i