Hunters allows you to connect data sources from different products through an intermediary Google Cloud Platform bucket.
This process is comprised of the following steps:
STEP 1: Create a GCP service account
STEP 2: Add key to service account
STEP 3: Set up bucket access
STEP 4: Provide information to Hunters
💡 Before you start
This process requires creating a service account and a bucket. They can be under different projects.
STEP 1: Create a GCP service account
The first step is to create a GCP service account.
Navigate to IAM & Admin > Service Accounts.
From the top menu, select + CREATE SERVICE ACCOUNT.
Choose a name, ID, and a helpful description, and click DONE.
STEP 2: Add key to service account
After creating your service account, we'll now need to add a key.
Click the menu icon of the service account and then click Manage keys.
Click ADD KEY > Create new key.
From the popup window, select JSON as the key type and click CREATE.
The one-time-only JSON key file will now be downloaded to your machine.
❗ IMPORTANT!
Keep this file safe where you can access it.
STEP 3: Set up bucket access
Once you have the JSON key file, you can set up access to the GCP bucket.
Navigate to your Cloud Storage Buckets, and locate the bucket you want to share with Hunters.
From the menu of the relevant bucket, select Edit access.
The Grant access drawer opens.
Click ADD PRINCIPAL to open the New Principals field.
Open the JSON key file you downloaded in the previous steps, and copy the
client_email
value.Paste the client email into the New Principals field.
Under Assign roles, search for the following roles and grant them:
Storage Object Viewer (roles/storage.objectViewer)
Storage Insights Collector Service (roles/storage.insightsCollectorService)
📘Learn more
Learn more about GCP IAM roles.
Click Save.
STEP 4: Provide information to Hunters
On the Hunters platform, navigate to Data > Data sources.
Click ADD DATA SOURCES.
From the integration tiles, locate the product you want to connect.
Click Connect.
Fill in the following fields:
Bucket project ID - Enter the ID of the project where the bucket is located.
Note: when the service account and the bucket are under the same project, this value will be identical to theproject_id
value in the JSON key file.Bucket name - Enter the bucket name.
Prefix(es) - enter the path to the files you want to include. Note:
You can use
*
as a wildcard to match any character.For efficiency, it's recommended to add a date partition, using the format
/{YYYY}/{MM}/{DD}
.When using a date partition, you must specify all subdirectory levels before adding the date. For example:
/*/*/*/{YYYY}/{MM}/{DD}/
.You can use date as a part of file, like:
/{YYYY}-{MM}-{DD}T{HH}*
There is no need to add the bucket name as part of the path.
Under step 2, fill in the required fields based on the information in the JSON key file downloaded in STEP 2.
-- OR --
Upload the JSON file to auto-complete the fields.📘 About the JSON Key file
Your JSON key file should look like this:
{ "type": "service_account", "project_id": "hunters", "private_key_id": "96aaxxxxxxxxxxxxxxxxxxx10", "private_key": "-----BEGIN PRIVATE KEY-----\nMII...<REDACTED>...wg\n-----END PRIVATE KEY-----\n", "client_email": "hunters@hunters.iam.gserviceaccount.com", "client_id": "105143366655555555530", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/hunters%40hunters.iam.gserviceaccount.com", "universe_domain": "googleapis.com" }
Use the values in this file to fill in the connection field on Hunters.
Click Test Connection and then Apply to finish.
💡If your bucket is vendor-hosted
If your GCP bucket is owned and managed by a vendor, you’ll need to perform the following steps: