Sha256: 5956b53acc071c794e5ef893df2516fd0c20b3af547cb9611e37a2daab636cf9

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

#!/usr/bin/env ruby
require 'wukong'

load '/home/dlaw/dev/wukong/examples/wikipedia/munging_utils.rb'

module PagelinksToTSV
  class Mapper < Wukong::Streamer::LineStreamer

    COLUMNS = [:int, :int, :string]

    def initialize
      @sql_parser = MungingUtils::SQLParser.new(COLUMNS)
    end

    def process(line, &blk)
      @sql_parser.parse(line, &blk)
    end
  end
end

# go to town
Wukong::Script.new(
  PagelinksToTSV::Mapper,
  nil
).run

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wukong-3.0.0.pre2 examples/munging/wikipedia/pagelinks/extract_pagelinks.rb.old