Last active
June 25, 2016 04:15
-
-
Save infectious/5047272 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fetch a list of siphons for download from AppNexus | |
extract :DWAPI do | |
get 'Siphon' | |
limit 2 | |
resolve do |response| | |
rows = [] | |
response.each do |input| | |
name = input[:name] | |
hour = input[:hour] | |
timestamp = input[:timestamp] | |
input['splits'].each do |split| | |
rows << { name: name, hour: hour, timestamp: timestamp, split: split['part'] } | |
end | |
end | |
rows | |
end | |
end | |
load :RDW do | |
into :data_siphons | |
insert_ignore | |
end | |
------------- | |
etl/apn/data_siphon/fetch.rb:13:in `[]': can't convert String into Integer (TypeError) | |
from etl/apn/data_siphon/fetch.rb:13:in `block (3 levels) in initialize' | |
from etl/apn/data_siphon/fetch.rb:12:in `each' | |
from etl/apn/data_siphon/fetch.rb:12:in `block (2 levels) in initialize' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment