Jeff you just reminded me of my first tableau project where I faced similar issue.
Probably the initial sql isn't fully supported by server. This happens on several databases which were not optimized for full functionality on server as compared to tableau desktop.
There might be another issue of user_id related capability. Are you sure you are a tableau admin or site admin ? does ur tableau server is set to hit external databases without any firewall restrictions?
It appears to be related to comments in the code (exactly what I’m not sure though). I removed the few lines that had comments and it publishes fine—go figure!