Discover and mask personal data in Gluesync
Before you replicate a customer table, you need to know which columns hold personal data, who may read them, and what reaches the target. In this guide you let Gluesync find those columns, correct what it got wrong, give one Manager access to two columns, and replicate the table with the personal data masked or left out.
In this guide
You will learn how to read the PII tags that Gluesync sets from the column names, scan a schema so that Gluesync also looks at sample values, mark and dismiss tags by hand, read masked results in Query Studio, let a Manager unmask chosen columns, and mask or drop personal data on its way to the target. You then check the target after the snapshot and after a change.
The examples use an Oracle schema CRM with the tables CUSTOMERS and SUPPORT_TICKETS, a pipeline named CRM to analytics that replicates CUSTOMERS to the PostgreSQL table crm.customers, and two test accounts, pii-analyst (a Manager) and pii-viewer (a Viewer). The steps were run on Oracle Database 19c with a PostgreSQL target.
Quick information
Goal |
Find and tag personal data, decide who can see it, and keep it masked in the target |
Audience |
Data protection officers, Gluesync administrators, and pipeline owners |
Level |
Intermediate |
Time required |
About 40 minutes |
Area |
Control Plane → Query Studio, Settings → Query data access, and the entity Field mapping |
Applies to |
Gluesync 2.3 |
Before you begin
Make sure that:
-
You can sign in to the Gluesync Control Plane as a Super Admin;
-
A pipeline has a source agent on the database that holds the personal data, such as Oracle with LogMiner, and a target agent, such as PostgreSQL. See Set up Oracle LogMiner CDC end to end if you do not have one yet;
-
You have a Manager and a Viewer account to test with, and a second browser or a private window to sign in as them. See Manage users, groups, and roles in Gluesync;
-
You can run SQL on the source and the target with a database client.
|
PII tags and masking in Query Studio change what users see. They do not change the data that a pipeline replicates. To keep personal data out of the target, you mask it or leave it out in the entity, as shown in Keep personal data out of the target. |
Guide steps
SQL
Skip this step if you use your own tables. These tables have columns with clear names, such as EMAIL, and columns whose names do not say what they hold, such as CONTACT and REF_CODE.
-
Connect to the pluggable database as a user that can create tables in the
CRMschema; -
Create the tables:
CREATE TABLE CRM.CUSTOMERS ( CUSTOMER_ID NUMBER PRIMARY KEY, FIRST_NAME VARCHAR2(40), LAST_NAME VARCHAR2(40), EMAIL VARCHAR2(120), PHONE VARCHAR2(30), BIRTH_DATE DATE, IBAN VARCHAR2(34), CITY VARCHAR2(40), COUNTRY CHAR(2), CONTACT VARCHAR2(120), -- a second e-mail address REF_CODE VARCHAR2(16), -- an Italian codice fiscale BADGE_NO VARCHAR2(12), -- an internal ID card number PASSPORT_CHECKED CHAR(1), -- Y or N TIER VARCHAR2(10), CREATED_AT TIMESTAMP ); CREATE TABLE CRM.SUPPORT_TICKETS ( TICKET_ID NUMBER PRIMARY KEY, CUSTOMER_ID NUMBER, OPENED_AT TIMESTAMP, CHANNEL VARCHAR2(10), REQUESTER VARCHAR2(120), -- an e-mail address or a phone number SUBJECT VARCHAR2(200), STATUS VARCHAR2(10) ); -
Insert test rows, for example:
INSERT INTO CRM.CUSTOMERS VALUES (1, 'Ines', 'Romano', 'ines.romano1@mail.example.org', '+39 378 0818400', DATE '1952-11-11', 'IT78X1815872660213393568992', 'Roma', 'IT', 'romano.1@partner.example.it', 'RMNNSI52S51A944J', 'LC4076023101', 'Y', 'bronze', TIMESTAMP '2026-07-14 10:00:00'); INSERT INTO CRM.SUPPORT_TICKETS VALUES (1, 53, TIMESTAMP '2026-11-09 09:30:00', 'email', 'customer53@example.com', 'Update phone number', 'open'); COMMIT;The example of this guide has 80 customers and 40 tickets. Use test values only. The value scan needs a few rows to sample, and it checks the format of each value: an IBAN must have a valid check number, and a codice fiscale a valid control character.
-
Grant the Gluesync user
SELECTon both tables, and turn on supplemental logging for change data capture (CDC):ALTER TABLE CRM.CUSTOMERS ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS; GRANT SELECT ON CRM.CUSTOMERS TO C##GLUESYNC; GRANT SELECT ON CRM.SUPPORT_TICKETS TO C##GLUESYNC; -
On PostgreSQL, create the target table. It has no column for the names, the birth date,
REF_CODE,BADGE_NO, orPASSPORT_CHECKED:CREATE SCHEMA crm; CREATE TABLE crm.customers ( customer_id numeric PRIMARY KEY, email varchar(120), phone varchar(30), iban varchar(34), city varchar(40), country char(2), contact varchar(120), tier varchar(10), created_at timestamp );
UI
Gluesync tags a column as soon as it lists it, from its name alone. It does not read any value for this.
-
Open Query Studio from the left menu;
-
In SQL-capable Agent, select the source agent of the pipeline, here ORCL;
-
In the schema browser, expand
CRM, thenCUSTOMERS.
CONTACT, REF_CODE, and BADGE_NO have none.The labels and the names that each one recognizes are listed in PII discovery and masking.
UI
A scan reads a small sample of values from each table and tags the columns whose values have a known format.
-
In the schema browser, select the three-dot menu next to
CRM; -
Select Scan schema for PII;
-
When the scan ends, expand
CUSTOMERSagain.
CONTACT and REF_CODE have a tag.The scan tags a column when most of the sampled values match the same format. REQUESTER holds e-mail addresses in some rows and phone numbers in others, so no single format wins. Phone numbers are recognized only in the international format without spaces, such as +393780818400. You tag such columns by hand in the next step.
See PII discovery and masking for the formats that the scan checks in each country.
UI
You know your data better than any rule. Dismiss the tags that are wrong, and add the ones that are missing.
-
Next to
PASSPORT_CHECKED, select the three-dot menu, then Not PII (passport); -
Next to
BADGE_NO, select the three-dot menu, then Mark as PII; -
Expand
SUPPORT_TICKETS, and markREQUESTERas PII the same way.
BADGE_NO is now tagged, and PASSPORT_CHECKED is not.Your corrections are kept by Core Hub. A later scan does not undo them, and they do not change the source database.
UI
Query Studio masks the tagged columns before the result leaves Core Hub, for every user.
-
Check that the toolbar shows PII masked;
-
Run:
SELECT * FROM CRM.CUSTOMERS -
Select the record view icon above the grid to open the first row.
Exports and copies of the result carry the masked values too. The masks of each label are listed in PII discovery and masking.
UI
A Manager sees the PII visible switch, but Core Hub unmasks only the columns that the Manager was granted. In this example, pii-analyst may read e-mail addresses and phone numbers, and nothing else.
-
As a Super Admin, select the shield icon Manage query data access in the Query Studio toolbar;
-
Select the user
pii-analystand the connection of the source agent; -
Keep Connection mode on Open;
-
Under PII unmask grants, select Add unmask grant, and enter
CRMin Schema,CUSTOMERSin Table, andEMAILin Column; -
Add a second grant for the column
PHONE; -
Select Save policy;
-
In the second browser, sign in as
pii-analyst, open Query Studio on the source agent, and switch PII masked to PII visible; -
Run:
SELECT CUSTOMER_ID, EMAIL, PHONE, IBAN, CONTACT FROM CRM.CUSTOMERS
|
PII visible reveals only the columns that you name in the |
An empty Schema, Table, or Column in a grant means all of them on that connection. For the other rules of Query data access, see Query pipeline data with Query Studio, and for what each role may do, see Roles and permissions.
UI
Query Studio masking stops at Query Studio. The pipeline still writes what the entity maps. Decide, column by column, whether the target needs the value, a masked value, or nothing.
-
On the pipeline page of CRM to analytics, open the entity
CRM.CUSTOMERSand its Field mapping; -
Leave unmapped the columns that the target does not need: here
FIRST_NAME,LAST_NAME,BIRTH_DATE,REF_CODE,BADGE_NO, andPASSPORT_CHECKED; -
In the target table, select the fx button of
email, open Functions collection, and select Mask Email; -
Apply Mask Email to
contact, Mask Phone Number tophone, and Mask IBAN toibanthe same way; -
Select Confirm;
-
Start the pipeline with Full copy.
|
The PII tags in Field mapping come from the column names. They do not show the result of the Query Studio scan or your corrections: in the example, |
The functions and their options are described in Field functions, and the dialog in Fields Editor. For a full walkthrough of field functions, see Transform columns with field functions.
UI + SQL
-
On the source, change one customer and add a new one, for example:
UPDATE CRM.CUSTOMERS SET EMAIL = 'ines.romano@newmail.example.com', PHONE = '+39 378 4412233' WHERE CUSTOMER_ID = 1; INSERT INTO CRM.CUSTOMERS VALUES (81, 'Luca', 'Bianchi', 'luca.bianchi81@example.com', '+39 345 1234567', DATE '1990-05-04', 'IT60X0542811101000000123456', 'Milano', 'IT', 'bianchi.81@partner.example.it', 'BNCLCU90E04F205X', 'LC1234567890', 'N', 'silver', SYSTIMESTAMP); COMMIT; -
In Query Studio, select the target agent, here analytics;
-
As a Super Admin, switch PII visible on and run:
SELECT customer_id, email, phone, iban, contact, city FROM crm.customers ORDER BY customer_id
The masking happens in the pipeline, so a client that reads PostgreSQL directly, without Query Studio, sees the same masked values.
Verify the result
-
The source columns that hold personal data carry a PII tag in Query Studio, and the false positives do not;
-
A Viewer sees only masked values and has no PII visible switch;
-
The Manager sees in clear only the columns of the unmask grants;
-
The target holds only masked values in the columns that need them, and none of the columns that you left unmapped, after the snapshot and after CDC.
Troubleshooting
| Problem | Possible cause | What to do |
|---|---|---|
A column that holds e-mail addresses or phone numbers has no tag after Scan schema for PII |
Its name is not a known name, and fewer than most of its sampled values have one format. Phone numbers with spaces are not recognized |
Mark the column with Mark as PII |
A column is tagged PII:passport, PII:name, or another label, but holds no personal data |
The tag comes from a word in the column name |
Select Not PII in the column menu |
PII visible is on, but a column stays masked |
The query uses |
Name the columns in the |
The response warns |
|
Name the columns in the |
The PII visible switch is missing |
The user is a Viewer |
Only a Manager or a Super Admin can unmask. Change the role in Settings → Users & access if the person needs it |
The target holds personal data in clear |
Query Studio masking does not change what the pipeline writes |
Apply a masking field function to the column, or leave it unmapped, in the entity Field mapping |
Related guides
Contact MOLO17 Support if you need assistance with personal data discovery or masking.