0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Shallow Clone 先のテーブルに対する権限不足によるVacuumエラー

Posted at

はじめに

Shallow Clone 元テーブル(nation)に対してVacuumを実行する際に、Shallow Clone 先のテーブル(nation_clone)に対する権限不足によるエラーが発生しましたので、再現方法と解決策を紹介します。

image.png

このエラーが発生する想定シチュエーションとしては、ジョブ実行用ユーザでメダリオンアーキテクチャの Silver テーブルの作成から最適化まで実行しており、一般ユーザがその Silver テーブルを Shallow Clone してしまうという状況が考えられるかなと思います。

権限確認

  • Shallow Clone 元テーブル(nation)に対して ユーザAに ALL PRIVILEGES 権限を付与

image.png

  • Shallow Clone 先テーブル(nation_clone)に対してはユーザAの権限なし

image.png

Vacuum実行

  • ユーザAの専用アクセスモード(シングルアクセスモード)クラスターを使用する

image.png

  • Shallow Clone 元テーブル(nation)に対してVacuumを実行すると、Shallow Clone 先テーブル(nation_clone)にSELECT権限がないというエラーが発生

image.png

解決策

  • クラスターを標準アクセスモード(共有アクセスモード)にして、Vacuumを実行すると成功する

image.png

image.png

  • もしくは、Shallow Clone 先のテーブル(nation_clone)にSELECT権限を付与すると成功する

image.png

おわりに

ドキュメントにも以下の記述が記載されていましたので、Shallow Clone テーブルの操作は標準アクセスモードのクラスターを使用するべきのようです。

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?