Skip to content

Google Cloud Storage

BInbox reads delimited text files (.csv, .tsv and .txt) and Excel workbooks (.xlsx) from one bucket and one folder in it. It asks Google for a token with the read-only storage scope (devstorage.read_only), so it can never write, whatever role the service account holds. If a file is replaced while BInbox reads it, BInbox refuses the file rather than mix the old and new contents.

BInbox lists the files directly in the folder whose names end in .csv, .tsv, .txt or .xlsx, in any case. Other files and the folder’s own folders’ files are not offered. Each file is a table.

  • A delimited text file (.csv, .tsv, .txt) is read the same way as a file you upload, including the header step.
  • An Excel workbook (.xlsx) is read by its sheets, as an uploaded workbook is. You choose the sheets in the setup’s sheet step, and the chosen sheets are put one under another as a single table. With no sheet step, BInbox reads the sheets it suggests. In the schema browser, a workbook’s columns are the header of the suggested sheets. BInbox reads only the parts of the workbook it needs, so its pictures and the sheets you did not choose are not downloaded.
  • A file over the connection’s byte limit is refused before BInbox reads any of it.

A dataset made from a file can keep a copy of the file on an extract schedule, as a warehouse’s table does. Each run copies the whole file within the connection’s limits and keeps the copy sealed with the dataset. When a copy holds a later complete month or day than the copy before it, that counts as new data, and a report scheduled on new data is queued. When a file no longer parses, or a workbook no longer has a chosen sheet, the copy fails with a message that says why, and nothing is kept. Setting up a dataset from one of these files is not built in the app yet.

On New connection, choose Google Cloud Storage.

Field What to enter
Bucket The bucket’s name.
Folder Optional. The path in the bucket the files are in, such as exports/sales. Leave it empty for the bucket’s top.
How BInbox signs in A service account’s user name and password or key file (a key file) or BInbox’s own identity, trusted by the warehouse (no secret kept).
Service account key (JSON) The whole key file Google gave you, pasted as text.
Workload identity provider Managed identity only. The provider’s full name, //iam.googleapis.com/projects/…/providers/….
Service account to act as Managed identity only, optional. A service account’s email address.
Terminal window
PROJECT=<project id>
gcloud iam service-accounts create binbox-reader --project=$PROJECT --display-name="BInbox reader"
SA=binbox-reader@$PROJECT.iam.gserviceaccount.com
gcloud storage buckets add-iam-policy-binding gs://<bucket> --member=serviceAccount:$SA --role=roles/storage.objectViewer
gcloud iam service-accounts keys create binbox-key.json --iam-account=$SA
  1. Open IAM and Admin, Service Accounts, Create service account. Name it binbox-reader and skip the optional steps that grant project roles.
  2. Open Cloud Storage, Buckets, the bucket, Permissions, Grant access. Add the service account’s email with the role Storage Object Viewer.
  3. Open the service account, Keys, Add key, Create new key, JSON. Paste the whole file’s text into Service account key (JSON) in BInbox, then delete the downloaded file.

Choose this only when BInbox tells you the issuer and subject to trust. Until BInbox gives each account its own token, its identity is shared by every account (see Connect a warehouse), so use Path 1.

Set up a workload identity pool and provider, and let its subject act as the service account, exactly as in BigQuery Path 2, but give the service account Storage Object Viewer on the bucket and no BigQuery roles. Paste the provider’s full name into Workload identity provider and the service account’s email into Service account to act as.

Role On Why BInbox needs it
Storage Object Viewer (roles/storage.objectViewer) The bucket To list the objects and read them.

Do not give Storage Object Admin, Storage Admin or a project Editor or Owner role.

Choose Test connection in BInbox. All three permissions must be Granted:

Permission Granted when
Sign in Google accepts the key, or the identity exchange, and gives a token.
List the files in the folder The service account may list the folder.
Read a file BInbox reads the first byte of the first non-empty CSV, TSV, text or Excel file in the folder.

If Read a file says the folder holds no CSV, TSV, text or Excel file to try, the folder is empty or the Folder path is wrong. The folder name is case-sensitive.

An owner or admin opens the Data tab at app.binbox.ai, chooses Connect, then New connection, fills in the fields above, and chooses Test and save. Connections describes the screen.

Setting up a dataset from one of the connection’s files is not built in the app yet. Pick a table covers tables and views.