G2
G2 is a peer-to-peer review platform for business software and services where users can share real-time reviews.
Bruin supports G2 as a source for Ingestr assets, and you can use it to ingest data from G2 into your data warehouse.
In order to set up G2 connection, you need to add a configuration item in the .bruin.yml file and in asset file.
Follow the steps below to correctly set up G2 as a data source and run ingestion.
Configuration
Step 1: Add a connection to .bruin.yml file
To connect to G2, you need to add a configuration item to the connections section of the .bruin.yml file. This configuration must comply with the following schema:
connections:
g2:
- name: "my-g2"
api_token: "YOUR_G2_API_TOKEN"api_token: the API token used for authentication with the G2 API v2
Step 2: Create an asset file for data ingestion
To ingest data from G2, you need to create an asset configuration file. This file defines the data flow from the source to the destination. Create a YAML file (e.g., g2_ingestion.yml) inside the assets folder and add the following content:
name: public.g2
type: ingestr
connection: postgres
parameters:
source_connection: my-g2
source_table: 'reviews'
destination: postgresname: The name of the asset.type: Specifies the type of the asset. Set this to ingestr to use the ingestr data pipeline.connection: This is the destination connection, which defines where the data should be stored. For example:postgresindicates that the ingested data will be stored in a Postgres database.source_connection: The name of the G2 connection defined in .bruin.yml.source_table: The name of the data table in G2 that you want to ingest. For example,reviewsis the table of G2 that you want to ingest. You can find the available source tables in G2 here
Available Source Tables
| Table | PK | Inc Key | Inc Strategy | Details |
|---|---|---|---|---|
| products | id | - | replace | Browse all G2 products |
| my_products | id | - | replace | Products owned by current account |
| vendors | id | updated_at | merge | List of vendors |
| categories | id | updated_at | merge | List of categories |
| category_features | id | updated_at | merge | Category product features grouped by category |
| product_features | id | updated_at | merge | Product features grouped by product |
| buyer_intent | id | - | replace | Buyer intent interactions per product |
| competitors | id | - | replace | Competitors per product |
| discussions | id | - | replace | Discussions per product |
| downloads | id | updated_at | merge | Downloads per product |
| integration_reviews | id | updated_at | merge | Integration reviews per product |
| questions | id | updated_at | merge | List of questions |
| reviews | id | updated_at | merge | Reviews per product |
| screenshots | id | updated_at | merge | List of screenshots |
| videos | id | updated_at | merge | Videos per product |
Step 3: Run asset to ingest data
bruin run assets/g2_ingestion.ymlAs a result of this command, Bruin will ingest data from the given G2 table into your Postgres database.