SPSS Modelerで間違えてDBにテーブルを作ってしまうことがあるかもしれません。
Db2についてはテストをしてDROP TABLEを行う方法を以下の記事で書きました。
SPSS ModelerでDROP TABLEを行う #SPSS - Qiita
Snowflakeについては「IF EXISTS」がないとエラーが発生するという情報を、CCCMHKDの山田様よりいただきました。「IF EXISTS」がなくてもDROP自体は成功しているのですが、「42S02[2003] SQL compilation error: Table 'SFTESTDB.SFTESTSC.INSERTTEST' does not exist or not authorized.」が発生してしまいます。どうも内部的に2回「DROP TABLE」が実行されてしまうようです。
具体的には「データベース」入力ノードの「SQLクエリー」に「DROP TABLE IF EXISTS」を書いて実行すれば削除可能でエラーになりません。
ダミーの「テーブル」ノードを接続して実行すると以下が表示されます。
メッセージを確認すると「DROP TABLE IF EXISTS」が実行できていることが確認できます。
- テスト環境
- Modeler 18.5
- Windows 11 64bit
- Snowflake
*サンプルストリーム