Sha256: 422eab30b1f0853db5ee8eaa6cb3fb46db1327a063c69e17c62f50c040ed9fc2

Contents?: true

Size: 802 Bytes

Versions: 3

Compression:

Stored size: 802 Bytes

Contents

#! /usr/bin/env jruby
$: << File.join(File.dirname(__FILE__), '..', 'lib')

# History: "project" (verb) used to be known as "restrict"

require 'cascading'
require 'samples/cascading'

cascade 'project' do
  flow 'project' do
    source 'input', tap('samples/data/data2.txt')

    assembly 'input' do
      split 'line', ['name', 'score1', 'score2', 'id'], :output => ['name', 'score1', 'score2', 'id']
      assert Java::CascadingOperationAssertion::AssertSizeEquals.new(4)
      project 'name', 'score1', 'score2'
      assert Java::CascadingOperationAssertion::AssertSizeEquals.new(3)
      project 'name', 'score2'
      assert Java::CascadingOperationAssertion::AssertSizeEquals.new(2)
    end

    sink 'input', tap('output/project', :sink_mode => :replace)
  end
end.complete(sample_properties)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cascading.jruby-0.0.6 samples/project.rb
cascading.jruby-0.0.5 samples/project.rb
cascading.jruby-0.0.4 samples/project.rb