Request a demo

Glossary · Governance and security

What is PII (personally identifiable information)?

PII is data that identifies a person directly, such as a name, email or ID number, or in combination, such as birth date with postcode. In BigQuery you find it with Sensitive Data Protection and metadata, and protect it with policy tags, masking, row-level security, encryption and retention.

Also called: personally identifiable information, personal data, sensitive data, PII in BigQuery, personal information

What counts as PII

Direct identifiers point to one person on their own: full name, email address, phone number, government ID, passport or account numbers. Quasi-identifiers identify people in combination: date of birth, postcode, gender, job title, IP address or device ID. Sensitive categories such as health, financial or biometric data carry extra legal obligations. Exact definitions differ by law (GDPR speaks of personal data, US state laws of personal information), so classification rules should come from your legal or privacy team.

Finding PII in BigQuery

  • Sensitive Data Protection discovery profiles BigQuery tables across an organization or project, detects infoTypes, and records sensitivity and risk levels per column.
  • Metadata checks catch obvious cases cheaply and show which ones are still unprotected:
SELECT
  table_schema AS dataset_id,
  table_name,
  column_name,
  data_type
FROM `region-us`.INFORMATION_SCHEMA.COLUMNS
WHERE REGEXP_CONTAINS(LOWER(column_name),
    r'email|phone|first_?name|last_?name|birth|address|postcode|zip|ssn|passport|iban|ip_address')
  AND ARRAY_LENGTH(policy_tags) = 0
ORDER BY dataset_id, table_name, column_name;

This lists columns whose names look personal and that have no policy tag. Name matching misses free-text fields and JSON payloads, so treat it as a complement to content scanning, not a replacement.

Protecting PII in BigQuery

  • Column-level access control: tag columns with policy tags; only principals with Fine-Grained Reader on the tag can read them.
  • Data masking: other users see NULL, a hash, the last four characters or another masked form.
  • Row-level security: restrict rows, for example to a user's own country or customers.
  • Encryption functions: AEAD functions encrypt values with keysets; deleting a person's key makes their encrypted values unreadable everywhere, a technique called crypto-deletion.
  • Minimize early: in ELT pipelines raw data lands first, so restrict raw datasets and drop or pseudonymize what analysts don't need in the first model.
  • Retention: partition expiration and table expiration delete old personal data automatically.

Fine-grained controls (column-level access control, masking and row-level security) are available on Enterprise and Enterprise Plus editions and on-demand pricing, not on Standard edition reservations.

Common pitfalls

  • Copies everywhere. Staging tables, snapshots, exports, BI extracts and sandbox copies all hold PII; protect the source and the copies.
  • Hashing as anonymization. Unsalted hashes of emails or phone numbers are reversible by guessing.
  • Free text. Support tickets and notes contain PII in unexpected places; scan contents, not only column names.
  • Deletion requests. Plan how a deletion reaches every table, and account for the time travel and fail-safe windows.

FAQ

Is a hashed email still PII?

Usually yes. A plain SHA-256 of an email can be reversed by hashing candidate emails and comparing, and the hash still links records about the same person. Hashing is pseudonymization, not anonymization; a secret salt or keyed encryption reduces, but doesn't remove, the risk.

If I delete a person's rows in BigQuery, is the data gone?

Not immediately. Deleted data stays recoverable through time travel for the dataset's window (two to seven days, seven by default) and then through fail-safe for another seven days. Copies in other tables, exports and backups need their own deletion.

How do I find PII in BigQuery automatically?

Enable Sensitive Data Protection discovery for BigQuery. It profiles tables continuously, detects infoTypes such as emails, phone numbers and credit card numbers, and scores sensitivity and risk per table and column.

Read next

Browse the full glossary

Observability for every BigQuery table, in about 15 minutes

Masthead detects freshness, volume and schema anomalies, monitors pipeline errors and maps column-level lineage across all your projects, from logs and metadata only.