Table: hubspot_hub_db - Query HubSpot Hubs using SQL
HubSpot Hubs are a part of the HubSpot platform designed to help businesses grow by bringing together different functionalities such as marketing, sales, service, and CRM. Each Hub is a suite of related tools, and they can be used individually or combined for a fully integrated experience. The HubSpot platform helps businesses attract visitors, convert leads, close customers, and delight customers into promoters.
HubDB is a powerful feature in HubSpot that allows you to create and manage custom relational databases within the HubSpot platform. It provides a flexible way to store, organize, and retrieve structured data, making it suitable for a variety of use cases such as product catalogs, event listings, knowledge bases, and more.
Table Usage Guide
The hubspot_hub_db
table provides insights into HubSpot Hubs within the HubSpot platform. As a marketing or sales professional, explore hub-specific details through this table, including the ID, name, and portal ID. Utilize it to uncover comprehensive information about each hub, such as its associated portal, helping you to better manage and organize your marketing and sales efforts.
Examples
Basic info
Explore the basic information about your Hubspot database, such as the number of columns and rows, publishing status, and creation details. This can be useful to understand the overall structure and content of your database at a glance.
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_db;
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_db;
List archived DBs
Explore which databases have been archived. This can be useful for maintaining data integrity and ensuring that outdated or unnecessary information is properly stored away.
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere archived;
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere archived = 1;
List public DBs
Explore which databases are set to public access to understand potential security risks and ensure appropriate data privacy measures are in place. This can be particularly useful for auditing and compliance purposes.
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere allow_public_api_access;
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere allow_public_api_access = 1;
List published DBs
Explore which databases have been published in your Hubspot Hub. This can help you understand the scope and scale of your data, as well as track the creation and publication of new databases.
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere published;
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere published = 1;
List DBs where child tables are not allowed
Discover the segments where child tables are disallowed in databases. This can be useful to understand the structure and restrictions of your database system.
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere not allow_child_tables;
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere allow_child_tables = 0;
List DBs created in the last 30 days
Discover the databases that were established within the past month. This query is beneficial for maintaining a fresh perspective on recent data additions and understanding the growth rate of your database accumulation.
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere created_at > now() - interval '30 days';
select id, title, label, published, column_count, row_count, created_by, created_atfrom hubspot_hub_dbwhere created_at > datetime('now', '-30 days');
Schema for hubspot_hub_db
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
allow_child_tables | boolean | Specifies whether child tables can be created. | |
allow_public_api_access | boolean | Specifies whether the table can be read by the public without authorization. | |
archived | boolean | = | Specifies whether the table is archived. |
column_count | bigint | Number of columns including deleted. | |
columns | jsonb | List of columns in the table. | |
created_at | timestamp with time zone | Timestamp at which the table was created. | |
created_by | jsonb | User who created the table. | |
dynamic_meta_tags | jsonb | Specifies the key-value pairs of metadata fields with associated column IDs. | |
enable_child_table_pages | boolean | Specifies the creation of multi-level dynamic pages using child tables. | |
id | text | = | Id of the table. |
label | text | Label of the table. | |
name | text | Name of the table. | |
portal_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the HubSpot portal or account. |
published | boolean | Specifies whether the table is published. | |
published_at | timestamp with time zone | Timestamp at which the table was recently published. | |
row_count | bigint | Number of rows in the table. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. | |
updated_at | timestamp with time zone | Timestamp at which the table was recently updated. | |
updated_by | jsonb | User who last updated the table. | |
use_for_pages | boolean | Specifies whether the table can be used for the creation of dynamic pages. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- hubspot
You can pass the configuration to the command with the --config
argument:
steampipe_export_hubspot --config '<your_config>' hubspot_hub_db