QuestionQ283

VerifiedEnsuring Data Security and Compliance

An organization handles customer data from web and mobile applications. The data includes names, emails, phone numbers, and location history. It arrives as both daily batch files from an SFTP drop and real-time streaming JSON events from Kafka.

To satisfy internal data-privacy policies, the following requirements must be met:

  • Personally identifiable information (PII), such as email, phone_number, and ip_address, must be masked or anonymized before storage.
  • Batch and streaming pipelines must use consistent PII handling.
  • Masking logic must be auditable and reproducible.
  • The masked data must remain usable for downstream analytics.

How should the data engineer design a compliant Databricks data pipeline that supports both batch and streaming modes, applies PII masking, and preserves transformation traceability for audits?

Explanation

Lakeflow Spark Declarative Pipelines provides a unified framework for batch and streaming pipelines. Applying a single defined PII-masking function in the Bronze ingestion transformation ensures that unmasked PII is not written to Delta Lake and that both ingestion modes use identical, reproducible logic. The declarative pipeline definition and Delta Lake transaction history provide transformation traceability for auditing, while the resulting masked values remain available for downstream analytics. Unity Catalog column masks are query-time access controls, so they do not meet a requirement to protect PII before storage.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!