Simple one I hope. I have created a duplicate flag in the script which the load does not like. Is there something wrong with the formula or can it simply not be done???
if(count(EpisodeNumber) - Count(distincEpisodeNumber) >1,1,0) as DuplicateEpisode_Flag,