Search code examples
google-cloud-dlp

Redacting collections of String efficiently with Google DLP?


I'm trying to port some DLP/PII de-identifying code that I wrote against the Beta V2 version of the Google DLP Java library classes. It no longer works because the Beta V2 service was retired and the Java API has changed. I've tried to refactor the code based on the new examples here. In the past, I was able to add a collection of ContentItem instances to the DLP client request, but now it appears to be limited to one item. Since the Java DLP library wraps an HTTP REST client, I want to make sure that I send data in efficient sizes. I may have hundreds of Strings that I want to send in one request. It's not really feasible to join them into one long String and then split them apart again, and I would prefer to not have to make hundreds of requests. What is the most efficient way of doing this with the new V2 API?


Solution

  • You can batch items together still, just instead use a ContentItem.Table.