c0nfusion
c0nfusion

Reputation: 1

Document AI adding folders

I'm using Document AI to parse PDF files from one bucket and then save them as JSON in another bucket in GCS. However, Document AI creates a folder with a subfolder in my bucket.

I've read a lot and I can see that this is normal behavior for Document AI. Is there any way to save the JSON files directly to the bucket without any additional folders?

All the help will be highly appreciated!

Thank you!

Upvotes: 0

Views: 129

Answers (1)

Holt Skinner
Holt Skinner

Reputation: 2232

This is the behavior for Document AI Batch Processing and there is not a way to directly output the JSON files directly into the bucket.

You could use gsutil to "flatten" out the JSON files into the top folder, something like this.

gsutil mv gs://bucket-name/*/*/*.json gs://bucket-name/

Upvotes: 0

Related Questions