apache_beam.ml.gcp.cloud_dlp module

PTransforms that implement Google Cloud Data Loss Prevention functionality.

apache_beam.ml.gcp.cloud_dlp.MaskDetectedDetails(project=None, deidentification_template_name=None, deidentification_config=None, inspection_template_name=None, inspection_config=None, timeout=None)[source]

Scrubs sensitive information detected in text. The PTransform returns a PCollection of str Example usage:

pipeline | MaskDetectedDetails(project='example-gcp-project',
  deidentification_config={
      'info_type_transformations: {
          'transformations': [{
              'primitive_transformation': {
                  'character_mask_config': {
                      'masking_character': '#'
                  }
              }
          }]
      }
  }, inspection_config={'info_types': [{'name': 'EMAIL_ADDRESS'}]})
apache_beam.ml.gcp.cloud_dlp.InspectForDetails(project=None, inspection_template_name=None, inspection_config=None, timeout=None)[source]

Inspects input text for sensitive information. the PTransform returns a PCollection of List[google.cloud.dlp_v2.proto.dlp_pb2.Finding] Example usage:

pipeline | InspectForDetails(project='example-gcp-project',
          inspection_config={'info_types': [{'name': 'EMAIL_ADDRESS'}]})