Sha256: 9299064951af6012349494ae1ef8b6553a77a45ac468a16cc75f287f8ddb1abf

Contents?: true

Size: 669 Bytes

Versions: 1

Compression:

Stored size: 669 Bytes

Contents

#!/usr/bin/env ruby

# Sample pig load statement:
#
#  page_metadata = LOAD '$page_metadata' AS (id:int, namespace:int, title:chararray, 
#    restrictions:chararray, counter:long, is_redirect:int, is_new:int, random:float, 
#    touched:int, page_latest:int, len:int);

require 'wukong'
require 'wukong/streamer/sql_streamer'
require 'wukong/streamer/encoding_cleaner'

module PageMetadataExtractor
  class Mapper < Wukong::Streamer::SQLStreamer
    include Wukong::Streamer::EncodingCleaner 
    columns [:int, :int, :string, :string, :int, 
             :int, :int, :float, :string, :int, :int]
   end
end

Wukong::Script.new(PageMetadataExtractor::Mapper, nil).run

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wukong-3.0.0.pre2 examples/munging/wikipedia/page_metadata/extract_page_metadata.rb