Hamilton is infamous for his drug problems; a cautionary tale amongst baseball talent advisors. I can't help but root for him(everyone deserves a second chance), but Josh did not hit well at the very lowest level of professional American baseball last year, so his chances of contributing much of anything next year at the highest level are remote.
Still, the trade was just for some cash and a roster spot. Not exactly a savvy veteran move...but hardly a catastrophe. It's unlikely to bear fruit(now or in the longrun), but at least they didn't give up anything much.