Skip to content

Instantly share code, notes, and snippets.

@infectious
Created August 10, 2012 13:58
Show Gist options
  • Save infectious/3314392 to your computer and use it in GitHub Desktop.
Save infectious/3314392 to your computer and use it in GitHub Desktop.
# Load 30 days of ip files into RDW
parameter :today do
2.day.ago.to_date
end
execute do
files = NOP(:ARC).join("appnexus/**/ips_*.txt.gz")
sources = files.reject do |file|
next true if file.date < (today - 30)
end
target = "ips"
NOP(:RDW).load_infile sources, target
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment