Code Snippet to integrate Google Document AI with Snowflake from a Lambda function
A Google Cloud account with Document AI APIs Enabled
A Snowflake account, ideally running in GCP
You will need a Lambda in AWS with external access. This is by default if you do not assign the Lambda to a VPC.
I used IRS 1040 Sample documents, all containing the same information, but of different qualities, skewness, and rotations. Please contanct me for help getting some documents if needed.
To run this system:
- Create your table in Snowflake to land the structured data extracted from the documents
https://github.com/will-hill/Google_Doc_AI_Lambda_Snowflake/blob/main/snowflake.sql. - Verify your Snowflake credentials
- Verify your Document AI REST API call
- Verify your Python locally
https://github.com/will-hill/Google_Doc_AI_Lambda_Snowflake/blob/main/lambda_function.py - Deploy your Python from Lambda