[ 
https://issues.apache.org/jira/browse/BEAM-9258?focusedWorklogId=387498&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-387498
 ]

ASF GitHub Bot logged work on BEAM-9258:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Feb/20 17:31
            Start Date: 14/Feb/20 17:31
    Worklog Time Spent: 10m 
      Work Description: aaltay commented on pull request #10849: [BEAM-9258] 
Integrate Google Cloud Data loss prevention functionality for Python SDK
URL: https://github.com/apache/beam/pull/10849#discussion_r379554152
 
 

 ##########
 File path: sdks/python/apache_beam/ml/gcp/cloud_dlp.py
 ##########
 @@ -0,0 +1,214 @@
+#  /*
+#   * Licensed to the Apache Software Foundation (ASF) under one
+#   * or more contributor license agreements.  See the NOTICE file
+#   * distributed with this work for additional information
+#   * regarding copyright ownership.  The ASF licenses this file
+#   * to you under the Apache License, Version 2.0 (the
+#   * "License"); you may not use this file except in compliance
+#   * with the License.  You may obtain a copy of the License at
+#   *
+#   *     http://www.apache.org/licenses/LICENSE-2.0
+#   *
+#   * Unless required by applicable law or agreed to in writing, software
+#   * distributed under the License is distributed on an "AS IS" BASIS,
+#   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   * See the License for the specific language governing permissions and
+#   * limitations under the License.
+#   */
+
+"""``PTransforms`` that implement Google Cloud Data Loss Prevention
+    functionality.
+"""
+
+from __future__ import absolute_import
+
+import logging
+
+from google.cloud import dlp_v2
+
+from apache_beam.options.pipeline_options import GoogleCloudOptions
+from apache_beam.transforms import DoFn
+from apache_beam.transforms import ParDo
+from apache_beam.transforms import PTransform
+from apache_beam.utils.annotations import experimental
+
+__all__ = ['MaskDetectedDetails', 'InspectForDetails']
+
+_LOGGER = logging.getLogger(__name__)
+
+
+@experimental()
+class MaskDetectedDetails(PTransform):
+  """Scrubs sensitive information detected in text.
+  The ``PTransform`` returns a ``PCollection`` of ``str``
+  Example usage::
+    pipeline | MaskDetectedDetails(project='example-gcp-project',
 
 Review comment:
   You may need to update this example for the project argument.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 387498)
    Time Spent: 2h 40m  (was: 2.5h)

> [Python] PTransform that connects to Cloud DLP deidentification service
> -----------------------------------------------------------------------
>
>                 Key: BEAM-9258
>                 URL: https://issues.apache.org/jira/browse/BEAM-9258
>             Project: Beam
>          Issue Type: Sub-task
>          Components: io-py-gcp
>            Reporter: Michał Walenia
>            Assignee: Michał Walenia
>            Priority: Major
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to