This project performs vector search using Python and Google Cloud services like BigQuery. Follow the steps below to set up the environment, install dependencies, and authenticate with Google Cloud.
...
...
@@ -24,6 +24,68 @@ Once the SDK is installed, authenticate with your Google Cloud account by runnin
gcloud auth login
```
## Create Table in BigQuery
This document provides the steps to create a table in Google BigQuery with the following specifications:
-**Table Name**: `your_table_name`
-**Columns**:
-`bpnId`: STRING (TEXT)
-`embeddings`: FLOAT64 (REPEATED)
-`text`: STRING (NOT NULL)
## Prerequisites
- Google Cloud account
- Access to BigQuery
-`gcloud` command-line tool installed and configured (optional)
## Steps to Create the Table
1.**Open BigQuery**:
- Go to the [Google Cloud Console](https://console.cloud.google.com/).
- Navigate to the BigQuery section.
2.**Select Dataset**:
- In the left panel, select your project.
- Click on the dataset where you want to create the table. If you don't have a dataset, create one by clicking on the project name and then "Create Dataset."
3.**Create Table**:
- Click on the dataset name.
- Click on "Create Table."
4.**Configure Table Settings**:
-**Source**: Select "Empty table."
-**Table Name**: Enter your desired table name (e.g., `your_table_name`).
-**Schema**: Define the schema as follows:
- Click on "Add field" to add the first column:
-**Field name**: `bpnId`
-**Type**: STRING
-**Mode**: REQUIRED
- Click on "Add field" to add the second column:
-**Field name**: `embeddings`
-**Type**: FLOAT
-**Mode**: REPEATED
- Click on "Add field" to add the third column:
-**Field name**: `text`
-**Type**: STRING
-**Mode**: REQUIRED
5.**Create the Table**:
- After filling in the details, click on the "Create table" button at the bottom of the page.
## Example SQL Command
You can also create the table using a SQL command in the BigQuery console or through the `bq` command-line tool. Here’s an example: