<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>dk521123</author_name>
  <author_url>https://blog.hatena.ne.jp/dk521123/</author_url>
  <blog_title>プログラム の超個人的なメモ</blog_title>
  <blog_url>https://dk521123.hatenablog.com/</blog_url>
  <categories>
    <anon>dbt</anon>
  </categories>
  <description>◾️はじめに 今回は、dbt Model / Macro内でSQL実行するための関数「run_query」 およびその周辺で使うTipsなどなどについてメモっておく 目次 【１】run_query関数 【２】set関数 設定方法１：set xxx=&quot;xxx&quot; 設定方法２：set xxx ... endset 【３】execute変数 １）if execute 【４】サンプル 例１：SELECT文の実行するマクロ 【５】使用上の注意 【１】run_query関数 * マクロ内からSQL実行するための関数 https://docs.getdbt.com/reference/dbt-jinja-fu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdk521123.hatenablog.com%2Fentry%2F2025%2F04%2F28%2F000032&quot; title=&quot;【dbt】dbt ～ SQL実行関数 / run_query ～ - プログラム の超個人的なメモ&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.image.st-hatena.com/image/square/adad63b72f1d6545b2ba2538c3fc2923b2fd5989/backend=imagemagick;height=80;version=1;width=80/https%3A%2F%2Fcdn.blog.st-hatena.com%2Fimages%2Fcircle%2Fofficial-circle-icon%2Fcomputers.gif</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-04-28 00:00:32</published>
  <title>【dbt】dbt ～ SQL実行関数 / run_query ～</title>
  <type>rich</type>
  <url>https://dk521123.hatenablog.com/entry/2025/04/28/000032</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
