<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>swfz</author_name>
  <author_url>https://blog.hatena.ne.jp/swfz/</author_url>
  <blog_title>notebook</blog_title>
  <blog_url>https://swfz.hatenablog.com/</blog_url>
  <categories>
    <anon>GoogleCloudPlatform</anon>
    <anon>BigQuery</anon>
    <anon>SQL</anon>
  </categories>
  <description>はてなブログで特に設定せずに記事を書いているとURLが次のような形式になる /entry/年/月/日/時分秒 この規則的な文字列から日付の情報を取り出すというのをBigQueryのSQLで行う 具体的な例としてはURLのパス/entry/2022/07/22/120000から2022-07-22を取り出す 今回は3パターン試してみた パターン1 愚直にSPLITして特定の日付箇所の添字を指定してCONCATする WITH sample AS ( SELECT '/entry/2019/07/07/035341' AS pagepath UNION ALL SELECT '/entry/2021…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fswfz.hatenablog.com%2Fentry%2F2022%2F07%2F25%2F201505&quot; title=&quot;BigQueryで特定の規則に沿った文字列から日付を取得する - notebook&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/swfz/20220725/20220725201435.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-07-25 20:15:05</published>
  <title>BigQueryで特定の規則に沿った文字列から日付を取得する</title>
  <type>rich</type>
  <url>https://swfz.hatenablog.com/entry/2022/07/25/201505</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
