Google Cloud Storage

Overview

This manual is divided into several sections, each focusing on a specific aspect of the Google Cloud Storage-Kognitos integration.

Introduction

The integration of Google Cloud Storage with Kognitos offers a seamless and efficient way to manage your files and data. This integration allows users to perform various operations such as dumping files and CSVs to Google Cloud Storage, purging files and CSVs from Google Cloud Storage, and enriching questions with additional information. This section provides an overview of the Google Cloud Storage-Kognitos integration and outlines the prerequisites for using Google Cloud Storage on Kognitos.

Prerequisites for Using Kognitos with Google Cloud Storage

Before you can start using Kognitos to interact with Google Cloud Storage, there are several prerequisites that need to be met:

  1. Google Cloud Account: You need to have an active Google Cloud account. If you do not have one, you can sign up for a Google Cloud trial account to get started.
  2. Google Cloud Storage Bucket: Ensure that you have a Google Cloud Storage bucket created. This bucket will be used to store your files and data.
  3. Service Account with Storage Admin Role: Create a service account in Google Cloud and assign it the Storage Admin role. This service account will be used by Kognitos to interact with Google Cloud Storage.
  4. Service Account Key: Download the JSON key file for your service account. This key file will be used to authenticate Kognitos with Google Cloud Storage.

Once these prerequisites are met, you are ready to start leveraging the power of Kognitos to enhance your Google Cloud Storage experience, making it more accessible, efficient, and customizable.


Setting Up Google Cloud Storage Connection

Connecting to Google Cloud Storage

To interact with Google Cloud Storage using Kognitos, establishing a secure connection to your Google Cloud Storage instance is the first critical step. This section outlines the credentials required for this connection and provides a detailed, step-by-step guide to connect successfully.

Required Credentials

To connect to Google Cloud Storage, you will need the following credentials:

  1. Service Account Key File: The JSON key file for your Google Cloud service account. This file contains the credentials required to authenticate with Google Cloud Storage.

Learning the Google Cloud Storage book (Integration)

  1. Gather Credentials: Ensure you have all the required credentials
  2. Navigate to the Department tab of Kognitos and search for the Google Cloud
  3. Click on + Book button on the right of the card


  1. Add in the credentials when you are prompted

Note: In case you see Test and Production credentials separately you can add both. If you don't have two sets of credentials you can use the same credentials in both.

Successful integration: Once the book has been learnt successfully, you are ready to perform various operations on Google Cloud Storage. You can now dump files, purge files, and enrich questions with additional information.


Working with Google Cloud Storage

Interacting with Google Cloud Storage is a core functionality when integrating Google Cloud Storage with Kognitos. This section covers how to dump files and CSVs to Google Cloud Storage, purge files and CSVs from Google Cloud Storage, and enrich questions with additional information.

Dumping Files to Google Cloud Storage

To dump a file to Google Cloud Storage, you need to specify the file and the Google Cloud Storage path.

Example:

get the file
the gs path is "gs://my_bucket/path/to/file"
dump the file to google cloud storage

This command dumps the specified file to the given Google Cloud Storage path.

Purging Files from Google Cloud Storage

To purge a file from Google Cloud Storage, you need to specify the file path.

Example:

the file path is "gs://my-bucket/path/to/my-file.txt"
purge the file from google cloud storage

This command purges the specified file from Google Cloud Storage.

Dumping CSVs to Google Cloud Storage

To dump a CSV to Google Cloud Storage, you need to specify the CSV path and optionally the bucket prefix and folder.

Example 1:

get the csv
the csv path is "data_exports/my_export.csv"
dump the csv to google cloud storage

This command dumps the specified CSV to the given Google Cloud Storage path.

Example 2:

get the csv
the csv path is "data_exports/my_export.csv"
the bucket prefix is "my_bucket"
the folder is "2023/exports"
dump the csv to google cloud storage

This command dumps the specified CSV to the given Google Cloud Storage path with the specified bucket prefix and folder.

Purging CSVs from Google Cloud Storage

To purge a CSV from Google Cloud Storage, you need to specify the CSV path and the Google Cloud Storage path.

Example 1:

purge the csv from google cloud storage with
  the gs path is "gs://my-bucket/folder1"
  the csv path is "in-folder-path/to/your/csvfile.csv"

This command purges the specified CSV from the given Google Cloud Storage path.

Example 2:

the csv path is "datasets/2023/march/sales_data.csv"
the gs path is "gs://my-bucket/folder2"
purge the csv from google cloud storage

This command purges the specified CSV from the given Google Cloud Storage path.

Enriching Questions

To enrich a question with additional information, you need to specify the details to be enriched.

Example:

enrich the question with
  the foo is "example"
  the bar is "detailed example"
  the baz is "further information"

the foo is "example"
the bar is "detailed example"
the baz is "further information"
enrich the question

This command enriches the question with the specified details.


Glossary of Terms

  • Google Cloud Storage: A service for storing objects in Google Cloud. It allows you to store and retrieve any amount of data at any time.
  • Service Account: A special type of Google account intended to represent a non-human user that needs to authenticate and be authorized to access data in Google APIs.
  • Bucket: A container for storing objects in Google Cloud Storage. Each bucket has a unique name and is used to organize and control access to your data.
  • CSV (Comma-Separated Values): A file format used to store tabular data, where each line represents a row and each value is separated by a comma.

By following these guidelines, you can effectively manage your Google Cloud Storage operations in Kognitos, from dumping and purging files to enriching questions with additional information.