Skip to content

Instantly share code, notes, and snippets.

@DGaffney
Created April 17, 2011 00:56
Show Gist options
  • Select an option

  • Save DGaffney/923653 to your computer and use it in GitHub Desktop.

Select an option

Save DGaffney/923653 to your computer and use it in GitHub Desktop.
## consumer.pm : tsvs_to_mysql
my $columns = join(",",@$SocialFlow::140Kit::Schema::Result::Click::imported_cols);
my $query = "LOAD DATA INFILE '$click_stream_tsv'
IGNORE INTO TABLE `clicks`
CHARACTER SET 'utf8'
($columns)";
## click.pm
sub cols {
[
["a"],
["c"],
["nk"],
["tz"],
["gr"],
["g"],
["i"],
["h"],
["k"],
["l"],
["al"],
["hh"],
["r"],
["u"],
["t"],
["hc"],
["cy"],
["ll"],
];
}
our $imported_cols = cols;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment