【Snowflake】Snowflake x Iceberg 〜基礎編 〜

◾️はじめに

https://dk521123.hatenablog.com/entry/2025/06/18/143804
https://dk521123.hatenablog.com/entry/2025/06/19/003715

の続き。

Icebergについて、触れることになったのでメモ。

目次

【1】SHOW ICEBERG TABLES
【2】DESCRIBE ICEBERG TABLE
【3】SHOW EXTERNAL VOLUMES
【4】DESCRIBE EXTERNAL VOLUME

【1】SHOW ICEBERG TABLES

* ICEBERG テーブル一覧を表示

https://docs.snowflake.com/ja/sql-reference/sql/show-iceberg-tables
出力内容
https://docs.snowflake.com/ja/sql-reference/sql/show-iceberg-tables#output

1)サンプル

SHOW ICEBERG TABLES;

-- 特定のスキーマ内を指定する場合
SHOW ICEBERG TABLES IN SCHEMA my_database.my_schema;

-- アカウント全体から探す場合
SHOW ICEBERG TABLES IN ACCOUNT;

-- 「prod_」から始まるテーブルのみを簡潔に表示したい場合
SHOW TERSE ICEBERG TABLES LIKE 'prod_%';

2)オプション

TERSE

* 5つの基本列だけ に絞って返

cf. TERSE (タース) ... 簡潔な、素っ気ない
Params Explanation Note
created_on 作成日時
name 名前
kind 種類 kind 列の値は常に ICEBERG TABLE
database_name DB名
schema_name スキーマ名

【2】DESCRIBE ICEBERG TABLE

* Icebergテーブル の列、Icebergテーブルの
 プロパティ値とデフォルト値を取得

https://docs.snowflake.com/ja/sql-reference/sql/desc-iceberg-table

1)構文

DESC[RIBE] [ ICEBERG ] TABLE <name> [ TYPE =  { COLUMNS | STAGE } ]

TYPE = COLUMNS | STAGE

* テーブルの列を表示するか、
 テーブルのステージプロパティ(現在の値とデフォルト値を含む)
 を表示するかを指定
* デフォルト: TYPE = COLUMNS

【3】SHOW EXTERNAL VOLUMES

*  外部ボリューム 一覧を表示

https://docs.snowflake.com/ja/sql-reference/sql/show-external-volumes

1)構文

SHOW EXTERNAL VOLUMES [ LIKE '<pattern>' ]

【4】DESCRIBE EXTERNAL VOLUME

* 外部ボリューム 一覧を表示

https://docs.snowflake.com/ja/sql-reference/sql/desc-external-volume

1)構文

DESC[RIBE] EXTERNAL VOLUME <name>

関連記事

Snowflake x Iceberg 〜 基礎知識編 〜
https://dk521123.hatenablog.com/entry/2025/06/18/143804
Snowflake x Iceberg 〜 入門編 〜
https://dk521123.hatenablog.com/entry/2025/06/19/003715

【Github】Github Actions ~ PR-Agent ~

◾️はじめに

https://dk521123.hatenablog.com/entry/2026/09/04/014658

で、Pull requestの説明文の自動生成について扱ったが
PR-Agentを使ってもできそうなので、試してみた

目次

【1】PR-Agent
【2】主な機能
【3】サンプル
 例1:GitHub Actions を使ってプルリクエストの説明文の自動生成
【4】補足:pull_request のイベント

【1】PR-Agent

* AIを活用してGitHubやGitLabなどの
 プルリクエスト作成やコードレビュー作業を
 自動化・効率化するためのオープンソースツール

【2】主な機能

Items Explanations
Describe プルリクエストの概要やタイトルを自動作成
Review コードのレビューを自動で行い、問題点を指摘
Improve 改善点を提案し、コードの修正を支援

【3】サンプル

例1:GitHub Actions を使ってプルリクエストの説明文の自動生成

* AI model は無料で使える"gemini/gemini-3.6-flash"を使用した
* 必要な設定は以下の通り

[1] Google AI StudioでAPIキーを作成

https://aistudio.google.com/app/apikey

[2] GitHubの Settings → Secrets and variables → Actions
[3] 次のSecretを登録

.github/workflows/append-pr-description.yml

name: Analyze Pull Request

on:
  pull_request_target:
    types: [opened]

permissions:
  issues: write
  pull-requests: write
  contents: write

jobs:
  pr_agent:
    runs-on: ubuntu-latest
    steps:
      - name: Analyze pull request
        uses: the-pr-agent/pr-agent@v0.44.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          config.model: "gemini/gemini-3.6-flash"
          config.fallback_models: '["gemini/gemini-3.6-flash"]'
          GOOGLE_AI_STUDIO.GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
          github_action_config.auto_describe: "true"
          github_action_config.auto_review: "false"
          github_action_config.auto_improve: "false"
          github_action_config.pr_actions: '["opened", "reopened", "synchronize"]'
          github_action_config.enable_output: "true"
          pr_description.publish_description_as_comment: "false"
          pr_description.add_original_user_description: "false"
          pr_description.use_description_markers: "true"
          pr_description.enable_pr_type: "false"
          pr_description.enable_pr_diagram: "false"
          pr_description.enable_semantic_files_types: "false"
          pr_description.include_generated_by_header: "false"
          config.response_language: "ja-JP"
          pr_description.extra_instructions: > 
            PRの変更内容を解析し、概要と主な変更点を日本語で3〜5個の箇条書きにしてください。
            影響範囲や注意点がある場合のみ、最後に短く追記してください。

.github/pull_request_template.md

## 📝 Objective
<!-- Here is a space for this PR -->

### Outline
<!-- Here is a space for PR agent. Don't need to add -->
pr_agent:summary

【4】補足:pull_request のイベント

https://docs.github.com/ja/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request

- assigned
- unassigned
- labeled
- unlabeled
- opened
- edited
- closed
- reopened
- synchronize
- converted_to_draft
- locked
- unlocked
- enqueued
- dequeued
- milestoned
- demilestoned
- ready_for_review
- review_requested
- review_request_removed
- auto_merge_enabled
- auto_merge_disabled

関連記事

Github ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2019/07/18/234652
Github ~ Pull Request ~
https://dk521123.hatenablog.com/entry/2019/12/15/231202
Github ~ Draft Pull Request ~
https://dk521123.hatenablog.com/entry/2022/09/20/000000
Github ~ Pull Request あれこれ ~
https://dk521123.hatenablog.com/entry/2026/09/04/014658
Github Actions ~ 基礎知識編 ~
https://dk521123.hatenablog.com/entry/2021/11/04/142835
Github Actions ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2022/06/16/151443
Github Actions ~ 基本編 ~
https://dk521123.hatenablog.com/entry/2023/12/22/195715

【Github】Github ~ Pull Request あれこれ ~

◾️はじめに

https://dk521123.hatenablog.com/entry/2019/12/15/231202
https://dk521123.hatenablog.com/entry/2022/09/20/000000

の続き。

Github の Pull Request について、便利なTipsをまとめておく

目次

【1】プルリクエストテンプレート
【2】プルリクエストの説明文の自動生成
 1)気軽にできる方法
 2)GitHub Actions を使う方法

【1】プルリクエストテンプレート

* 以下の公式ドキュメントに詳しく書かれている

https://docs.github.com/ja/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository

* .github/pull_request_template.md を作成するだけ

【2】プルリクエストの説明文の自動生成

1)気軽にできる方法

GitHubのPR作成画面で、
説明文欄のアイコン(ヘッダー)から「Summary」を選ぶだけで、
変更内容の概要をAIが自動作成
 => 詳細は、以下の公式ドキュメントを参照

https://docs.github.com/ja/enterprise-cloud@latest/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/create-a-pr-summary

2)GitHub Actions を使う方法

* 以下の関連記事を参照のこと

Github Actions ~ PR-Agent ~
https://dk521123.hatenablog.com/entry/2026/09/05/001903

関連記事

Github ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2019/07/18/234652
Github ~ Pull Request ~
https://dk521123.hatenablog.com/entry/2019/12/15/231202
Github ~ Draft Pull Request ~
https://dk521123.hatenablog.com/entry/2022/09/20/000000
Github Actions ~ PR-Agent ~
https://dk521123.hatenablog.com/entry/2026/09/05/001903