apache_beam.ml.gcp.cloud_dlp module

PTransforms that implement Google Cloud Data Loss Prevention functionality.

apache_beam.ml.gcp.cloud_dlp.MaskDetectedDetails(*args, **kwds)[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(*args, **kwds)[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'}]})