Google BigQuery Integration
BigQuery is a serverless data warehouse providing scalable data analysis. Most business intelligence tools support data import from Google Bigquery giving access to the video analysis results in the familiar tools. Ultinous AI Suite produces alarms, counting and object detection information which can be made available as database records in Google Bigquery.
Before you start
Please make sure that you have:
- A registered Google account for Google Cloud.
- A new Google Cloud Project is created by you or your system administrator, and your Google Account has access to it.
Setup Google BigQuery
Login to Google Cloud Console.
Open the hamburger menu on the upper left corner of the screen -> click APIs & Services.
Click + Create Credentials -> select Service Account
Fill in the Service account name field: e.g. "AI Suite Service Account".
You may leave the Service Account ID as default (auto generated).
Click the Create and Continue button.
The credentials are added to your Service Accounts list. Click on new the list item.
Click the KEYS tab.
Click Add Key -> Create new key.
Select .json format.
Click the Create button.
Download the .json file.
NOTE: Make sure you don't lose this file for it cannot be obtained again without creating new credentials as well. This file will have to be uploaded to Ultinous AI Suite in a later step.
Click the DETAILS tab.
Copy the text in the Email section.
Create a BigQuery dataset
- Go to the hamburger menu on the upper left corner of the screen -> Click BigQuery.
- Find your project and click the ... button next to it -> Click Create Dataset.
- Add a new ID. and click the Create Dataset button.
Connect your Service Account with the new dataset
- Find your new dataset and Click ... button next to it -> Share
- In the Dataset Permission panel, click Add Principal.
- In the New principal field, paste the Service Account Email text you have copied in the Create Credentials section's steps.
Set the Role to BigQuery Data Editor.
Connect Ultinous AI Suite with your Google Bigquery dataset
Add your credentials to Ultinous AI Suite
- Go To Control Panel -> Integration.
- Scroll down to the Google BigQuery Credentials section, then upload the .json file you have downloaded in the Create Credentials step.
- Once it's successfully uploaded you can test if everything is set up correctly: To do so, type your dataset name in the Test Credentials section and click the button under it. If your settings are correct, a "Dataset accessed successfully" message will appear.
Enable BigQuery integration in your solution
Register a new solution in your Solutions menu.
NOTE: Currently, only the Traffic Counting solution supports Google BigQuery integration. All solutions will support it in a future release.
In the new solution's parameters, click Enable Bigquery integration.
Type your dataset name.
Add a table name. It will be created automatically if it does not exist yet.
NOTE: For the same site, consider using the same table where you would like to handle data from the same site.
Using the analytics data
NOTE: In extremely rare cases Google inserts a record multiple times. To filter duplicate records you can use SELECT DISTINCT * .... in your query.
Traffic counting data
|timestamp||TIMESTAMP||NULLABLE||The time of the line crossing.|
|index||INTEGER||NULLABLE||Since multiple objects can cross lines at the same time, these occurrences are differentiated by this value.|
|direction||STRING||NULLABLE||One of "IN", "OUT".|
|site_name||STRING||NULLABLE||Currently always null. Will be used in a future release.|
|camera_display_name||STRING||NULLABLE||The Display name of the triggering camera set in the Cameras menu.|
|camera_technical_name||STRING||NULLABLE||The Technical name of the triggering camera set in the Cameras menu.|
|object_type||STRING||NULLABLE||One of "PERSON_FULL_BODY ", "CAR", "BUS", "TRUCK", "MOTORCYCLE", "BICYCLE", "TRAIN", "BOAT", "AIRPLANE".|