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?

重複を排除したレコード追加(UNION/UNION DISTINCT)(SPSS Modeler データ加工逆引き6-17)

Posted at

重複を排除したレコード追加(UNION/UNION DISTINCT)

スクリーンショット 2025-08-25 16.27.57.png

1.想定される利用目的

・データのクレンジング

2.サンプルストリームのダウンロード

3.サンプルストリームの説明

スクリーンショット 2025-08-25 16.06.37.png

a1.入力するデータのひとつめは以下の通りです。

スクリーンショット 2025-08-25 16.10.21.png

a2.入力するデータふたつめは以下の通りです。

スクリーンショット 2025-08-25 16.10.52.png

c.[レコード追加]ノードを編集します。設定をしなくても項目名で自動的にマッチングされます。

スクリーンショット 2025-08-25 16.11.08.png

[プレビュー]します。6行と4行のレコードを追加して10行になりました。いわゆるUNION ALLです。

スクリーンショット 2025-08-25 16.11.42.png

c.[重複レコード]ノードを編集します。[各グループの最初のレコードだけを含める]を選択して、ふたつ目以降に発見した重複を排除します。

スクリーンショット 2025-08-25 16.12.39.png

[テーブル]を実行します。

スクリーンショット 2025-08-25 16.13.37.png

注意事項

SQLのUNIONやUNION DISTINCTは一度にレコード追加と重複排除を行いますが、Modelerでは同時にできないため、2段階で行いました。

4.参考情報

複数のテーブルを縦方向に追加する

SPSS Modeler ノードリファレンス目次

SPSS Modeler 逆引きストリーム集(データ加工)

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?