Search docs.molo17.com
    Configuration guide Security

    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:

    1. You can sign in to the Gluesync Control Plane as a Super Admin;

    2. 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;

    3. 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;

    4. 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

    Optional: create the sample tables

    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.

    1. Connect to the pluggable database as a user that can create tables in the CRM schema;

    2. 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)
      );
    3. 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.

    4. Grant the Gluesync user SELECT on 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;
    5. On PostgreSQL, create the target table. It has no column for the names, the birth date, REF_CODE, BADGE_NO, or PASSPORT_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
      );
    See the tags set from the column names

    UI

    Gluesync tags a column as soon as it lists it, from its name alone. It does not read any value for this.

    1. Open Query Studio from the left menu;

    2. In SQL-capable Agent, select the source agent of the pipeline, here ORCL;

    3. In the schema browser, expand CRM, then CUSTOMERS.

    Query Studio schema browser with the CUSTOMERS columns
    Figure 1. The columns with a known name carry a PII tag. CONTACT, REF_CODE, and BADGE_NO have none.
    Expected result

    FIRST_NAME and LAST_NAME show PII:name, EMAIL PII:email, PHONE PII:phone, BIRTH_DATE PII:date-of-birth, and IBAN PII:iban. PASSPORT_CHECKED shows PII:passport only because its name contains passport. CONTACT, REF_CODE, and BADGE_NO have no tag, even though they hold an e-mail address, a codice fiscale, and an ID card number.

    The labels and the names that each one recognizes are listed in PII discovery and masking.

    Scan the schema for personal data

    UI

    A scan reads a small sample of values from each table and tags the columns whose values have a known format.

    1. In the schema browser, select the three-dot menu next to CRM;

    2. Select Scan schema for PII;

    3. When the scan ends, expand CUSTOMERS again.

    Menu of the CRM schema with Scan schema for PII marked 1
    Figure 2. The schema menu starts a scan of all its tables (1).
    CUSTOMERS columns after the scan
    Figure 3. After the scan, CONTACT and REF_CODE have a tag.
    Expected result

    CONTACT now shows PII:email, and REF_CODE PII:it.codice-fiscale. BADGE_NO still has no tag: its values are an internal format that the scan does not know. In SUPPORT_TICKETS, REQUESTER has no tag either.

    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.

    Correct the tags

    UI

    You know your data better than any rule. Dismiss the tags that are wrong, and add the ones that are missing.

    1. Next to PASSPORT_CHECKED, select the three-dot menu, then Not PII (passport);

    2. Next to BADGE_NO, select the three-dot menu, then Mark as PII;

    3. Expand SUPPORT_TICKETS, and mark REQUESTER as PII the same way.

    Menu of the PASSPORT_CHECKED column with Not PII (passport) marked 1
    Figure 4. Not PII dismisses the tag of a column that is not personal data (1).
    Menu of the REQUESTER column in SUPPORT_TICKETS with Mark as PII marked 1
    Figure 5. Mark as PII tags a column that the scan missed (1).
    CUSTOMERS columns with BADGE_NO tagged PII:national-id and PASSPORT_CHECKED with no tag
    Figure 6. BADGE_NO is now tagged, and PASSPORT_CHECKED is not.
    Expected result

    PASSPORT_CHECKED has no tag. BADGE_NO and REQUESTER show PII:national-id, the label that Mark as PII uses.

    Your corrections are kept by Core Hub. A later scan does not undo them, and they do not change the source database.

    Read the masked results

    UI

    Query Studio masks the tagged columns before the result leaves Core Hub, for every user.

    1. Check that the toolbar shows PII masked;

    2. Run:

      SELECT * FROM CRM.CUSTOMERS
    3. Select the record view icon above the grid to open the first row.

    Record 1 of 80 with FIRST_NAME and LAST_NAME shown as dots
    Figure 7. Each label has its own mask. Untagged columns are shown as they are.
    Expected result

    Names, the birth date, REF_CODE, and BADGE_NO show ••••. E-mail addresses keep their first character and their top-level domain, such as i***@***.org. Phone numbers keep their last two characters, such as ••••00, and IBANs their last four, such as ••••8992. CITY, COUNTRY, PASSPORT_CHECKED, and TIER are shown in clear.

    Exports and copies of the result carry the masked values too. The masks of each label are listed in PII discovery and masking.

    Let a Manager unmask chosen columns

    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.

    1. As a Super Admin, select the shield icon Manage query data access in the Query Studio toolbar;

    2. Select the user pii-analyst and the connection of the source agent;

    3. Keep Connection mode on Open;

    4. Under PII unmask grants, select Add unmask grant, and enter CRM in Schema, CUSTOMERS in Table, and EMAIL in Column;

    5. Add a second grant for the column PHONE;

    6. Select Save policy;

    7. In the second browser, sign in as pii-analyst, open Query Studio on the source agent, and switch PII masked to PII visible;

    8. Run:

      SELECT CUSTOMER_ID, EMAIL, PHONE, IBAN, CONTACT FROM CRM.CUSTOMERS
    Query data access settings with Open connection mode marked 1
    Figure 8. The connection stays Open (1), with two unmask grants (2) and Save policy (3).
    Query result as pii-analyst with the PII visible switch marked 1
    Figure 9. With PII visible on (1), the Manager sees the granted columns in clear and the others masked.
    Expected result

    Data access policy saved appears. For pii-analyst, EMAIL and PHONE show the original values, while IBAN and CONTACT stay masked. When pii-viewer opens Query Studio, the toolbar has no PII visible switch at all: a Viewer can never unmask, even with a grant.

    PII visible reveals only the columns that you name in the SELECT list. With SELECT *, every tagged column stays masked, even for a Super Admin.

    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.

    Keep personal data out of the target

    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.

    1. On the pipeline page of CRM to analytics, open the entity CRM.CUSTOMERS and its Field mapping;

    2. Leave unmapped the columns that the target does not need: here FIRST_NAME, LAST_NAME, BIRTH_DATE, REF_CODE, BADGE_NO, and PASSPORT_CHECKED;

    3. In the target table, select the fx button of email, open Functions collection, and select Mask Email;

    4. Apply Mask Email to contact, Mask Phone Number to phone, and Mask IBAN to iban the same way;

    5. Select Confirm;

    6. Start the pipeline with Full copy.

    Field mapping of CRM CUSTOMERS to crm customers with the source PII tags marked 1
    Figure 10. The source columns show PII tags (1). The masked target columns have a blue fx (2). Confirm saves the mapping (3).
    Expected result

    The fx buttons of email, phone, iban, and contact turn blue, and the unmapped source columns have no arrow. After Confirm, the entity starts with a full copy of the 80 rows.

    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, CONTACT, REF_CODE, and BADGE_NO have no tag, and PASSPORT_CHECKED still has one. Use the tags you checked in Query Studio as your list of personal data.

    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.

    Check the target after the snapshot and a change

    UI + SQL

    1. 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;
    2. In Query Studio, select the target agent, here analytics;

    3. 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
    Query Studio on the PostgreSQL target as admin with PII visible marked 1 and the email column marked 2
    Figure 11. Even with PII visible on (1), the target holds only masked values (2).
    Expected result

    The query returns 81 rows. E-mail addresses are stored as i**********@newmail.example.com, phone numbers keep the country code and the last four digits, such as 2233, and IBANs keep IT78 and the last four characters. Row 1 has the new e-mail address and row 81 the new customer, both masked. The target has no names, birth dates, or ID numbers at all.

    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 SELECT *, or the user has no unmask grant for that column

    Name the columns in the SELECT list, and check the PII unmask grants of the user in Query data access

    The response warns Column 'email' stayed masked: no PII unmask grant for customers.email after SELECT *

    SELECT * keeps all tagged columns masked

    Name the columns in the SELECT list

    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

    Contact MOLO17 Support if you need assistance with personal data discovery or masking.