Skip to content

Instantly share code, notes, and snippets.

@BJClark
Created May 12, 2009 18:43
Show Gist options
  • Save BJClark/110649 to your computer and use it in GitHub Desktop.
Save BJClark/110649 to your computer and use it in GitHub Desktop.
class SomeEvent
attr :attr1, :attr2
def to_scribe
"#{attr1}\t#{attr2}\n"
end
end
Rails.scribe.event(SomeEvent.new("foo", "bar"))
log:
foo\tbar\n
Hive:
CREATE TABLE foobar (foo STRING, bar STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE;
LOAD DATA INPATH "/log/scribe" INTO TABLE foobar;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment