title: Decode Raw URL in Hadoop Hive, prefer non-Java solutions
body: <p>I am querying against a hive table that has a field <code>out_url</code> that has raw url encoding, like: </p>
  
  <p><code>http%3A%2F%2Fwww.example.com%2Findex.php%3Fpage%3D260%26id%3D22</code></p>
  
  <p>I want to extract only the domain, and that would be possible with 
  `parse_url(out_url, 'HOST') if the url was not raw-encoded.</p>
  
  <p>To get around this, I'm doing this ugly double regexp replacement like:</p>
  
  <p><code>parse_url(regexp_replace(regexp_replace(out_url, '%3A', ':'), '%2F', '/'), 'HOST')</code></p>
  
  <p>that converts the <code>%3A</code> to <code>:</code> and <code>%2F</code> to <code>/</code> and then extracts the domain. I understand that I could write a Java UDF to do this, but that's not a great option for me as I currently mostly suck at writing Java.</p>
  
  <p>Ideas? Is it possible to write a Python UDF?</p>