概要
Google Dataplex にて BigQuery に対する Sensitive Data Discovery の実行結果を表示してみました。下記のようにタグが設定されるようです。
センシティブデータを検出するサービスとして Cloud DLP (Data Loss Prevention)というサービスがあったようなのですが、Sensitive Data Discovery というサービスに組み込まれたようです。
Cloud Data Loss Prevention (Cloud DLP) is now a part of Sensitive Data Protection. The API name remains the same: Cloud Data Loss Prevention API (DLP API). For information about the services that make up Sensitive Data Protection, see Sensitive Data Protection overview.
引用元:データ プロファイル | Sensitive Data Protection Documentation | Google Cloud
Cloud Data Loss Prevention(Cloud DLP)は、Sensitive Data Protection の一部になりました。API の名前は Cloud Data Loss Prevention API(DLP API)のままです。Sensitive Data Protection を構成するサービスの詳細については、「Sensitive Data Protection の概要」を参照してください。
上記の翻訳
引用元:データ プロファイル | Sensitive Data Protection Documentation | Google Cloud
Sensitive Data Discovery の実行結果に基づきタグを実行したいと考えて、当初は Dataplex にタグを設定する手順を検証しましたが、BigQuery にデータを格納したほうがタグ付けする際には容易に利用できる可能性もあります。Dataplex と BigQuery のどちらにもデータを登録できるため、どちらにも登録する方がいいかもしれません。
本記事では、下記のサービスを利用できることを前提としています。
- BigQuery
- Dataplex
- Sensitive Data Protection
実施手順
1. BigQuery にテーブル作成とデータの挿入を実施
1-1. テーブル作成
CREATE OR REPLACE TABLE bq-publisher-01.data_profiling_test.profile_table_10 (
ID STRING,
family_namae STRING,
First_name STRING,
mail_address STRING,
address STRING,
Customer_Lever STRING,
Description STRING
);
1-2. データの挿入
INSERT INTO
bq-publisher-01.data_profiling_test.profile_table_10 (
ID,
family_namae,
First_name,
mail_address,
address,
Customer_Lever,
Description
)
VALUES
('1', 'Yamada', 'Taro', 'taro.yamada@example.com', 'Tokyo', 'Gold', 'First customer'),
('2', 'Suzuki', 'Hanako', 'hanako.suzuki@example.com', 'Osaka', 'Silver', 'Second customer'),
('3', 'Tanaka', 'Ichiro', 'ichiro.tanaka@example.com', 'Nagoya', 'Gold', 'Third customer'),
('4', 'Sato', 'Jiro', 'jiro.sato@example.com', 'Fukuoka', 'Bronze', 'Fourth customer'),
('5', 'Kobayashi', 'Saburo', 'saburo.kobayashi@example.com', 'Sapporo', 'Silver', 'Fifth customer');
1-3. データの確認
SELECT * FROM bq-publisher-01.data_profiling_test.profile_table_10 LIMIT 5