title: Split and rejoin part of a string in BigQuery
body: <p>I'm querying the github sample_files dataset in bigquery and I want to get the the path excluding the filename.</p>
  <p>So if I have /path/to/file.txt
  I want it to return /path/to</p>
  <p>In python I could do something like</p>
  <pre><code>&quot;/&quot;.join(str.split(a, &quot;/&quot;)[0:-1])
  </code></pre>
  <p>but I'm not sure how to do that in bigquery/sql
  Any ideas? THanks!</p>