Created
May 10, 2010 20:58
-
-
Save mkeen/396537 to your computer and use it in GitHub Desktop.
This file contains 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
fun({Doc}) -> | |
DocumentID = proplists:get_value(<<"_id">>, Doc, null), | |
case DocumentID == <<"campaigns">> of | |
true -> | |
AdwordsCampaigns = proplists:get_value(<<"adwords">>, Doc, null), | |
[Emit(DocumentID, Campaign) || Campaign <- AdwordsCampaigns]; | |
false -> ignore | |
end | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment