Giter Site home page Giter Site logo

docai-on-bigquery's Introduction

SQL over Docs

The goal of this demo is to run a BigQuery SQL and extract information from documents.

Requirements

  • Ensure the GCP user is allowed to create service accounts and assign roles
  • BQ object tables need to be enabled (as of 12/5/2022 they were in private preview), if you do not have access to enable object tables manually create and load the BQ tables

Architecture

SQL Doc

Setting up the demo

1) In Cloud Shell or other environment where you have the gcloud SDK installed, execute the following commands:

gcloud components update 
cd $HOME

git clone https://github.com/dojowahi/docai-on-bigquery.git
cd ~/docai-on-bigquery
chmod +x *.sh

2) Edit config.sh - In your editor of choice update the variables in config.sh to reflect your desired gcp project.

3) Next execute the command below

sh setup_sa.sh

4) Next execute the command below

sh deploy_cf.sh

If the shell script has executed successfully,have a dataset docai and and a BQ object table repos should be created under your project in BigQuery along with a function doc_extractor

Note: Your script will fail in creation of the BQ table if the GCP project is not enabled to use object tables. You will need to manually create the table and load pointers to the PDFs in GCS



Congrats! You just executed BigQuery SQL over Documents

docai-on-bigquery's People

Contributors

dojowahi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.