Generate TPC-H Data on Hive or Iceberg
Generate TPC-H rows through a provisioned Trino TPC-H connector, then materialize the rows in warehouse, Hive, or Iceberg tables for testing. Generated source tables calculate data during reads; querying them directly also measures generation work.
Prerequisites
- Ask VeloDB Cloud support to confirm and provision the compatible
tpchconnector for your SaaS or BYOC warehouse. Connector plugins are managed runtime dependencies; SQL catalog creation alone does not install them. - Use a SQL account with permission to create catalogs and write the destination tables.
- Provision a writable destination catalog and ensure its metadata and storage endpoints are reachable from the warehouse.
Provision the TPC-H connector
The upstream Apache Doris example uses Trino connector version 435. VeloDB Cloud manages plugin installation, compatibility checks, and any required service restart. Provide the connector name and workload requirements to VeloDB Cloud support; use the SQL below only after the runtime dependency has been provisioned.
Create a TPC-H catalog
CREATE CATALOG `tpch` PROPERTIES (
"type" = "trino-connector",
"trino.connector.name" = "tpch",
"trino.tpch.column-naming" = "STANDARD",
"trino.tpch.splits-per-node" = "32"
);
The split-count property controls data-generation parallelism. The example uses 32; choose a value for your warehouse capacity and compare CPU use, memory use, and generation time. Twice the backend CPU count is upstream sizing guidance, not an optimal value for every warehouse.
When "tpch.column-naming" = "STANDARD", the column names in the TPCH table will start with the table name abbreviation, such as l_orderkey, otherwise, it is orderkey.
Use the TPC-H catalog
The TPCH Catalog has pre-configured TPCH datasets of different Scale Factors, which can be viewed using the SHOW DATABASES and SHOW TABLES commands.
mysql> SWITCH tpch;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| sf1 |
| sf100 |
| sf1000 |
| sf10000 |
| sf100000 |
| sf300 |
| sf3000 |
| sf30000 |
| tiny |
+--------------------+
mysql> USE sf1;
mysql> SHOW TABLES;
+---------------+
| Tables_in_sf1 |
+---------------+
| customer |
| lineitem |
| nation |
| orders |
| part |
| partsupp |
| region |
| supplier |
+---------------+
You can directly query these tables using the SELECT statement.
Tip:
The data in these pre-configured datasets is not actually stored but is generated in real-time during queries. Therefore, these pre-configured datasets are not suitable for direct Benchmark testing. They are suitable for writing datasets into other target tables (such as warehouse tables, Hive, Iceberg, and all other data sources that VeloDB Cloud supports writing to) through
INSERT INTO SELECT, and then performing performance testing on the target tables.
Build a TPC-H dataset
The following example quickly builds a TPCH test dataset on Hive using the CTAS statement:
CREATE TABLE hive.tpch100.customer PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpch.sf100.customer ;
CREATE TABLE hive.tpch100.lineitem PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpch.sf100.lineitem ;
CREATE TABLE hive.tpch100.nation PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpch.sf100.nation ;
CREATE TABLE hive.tpch100.orders PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpch.sf100.orders ;
CREATE TABLE hive.tpch100.part PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpch.sf100.part ;
CREATE TABLE hive.tpch100.partsupp PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpch.sf100.partsupp ;
CREATE TABLE hive.tpch100.region PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpch.sf100.region ;
CREATE TABLE hive.tpch100.supplier PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpch.sf100.supplier ;
Tip:
The upstream Apache Doris example reports about 25 minutes for TPC-H 1000 and 4–5 hours for TPC-H 10000 on three 16-core backend nodes. The report does not specify a Cloud deployment, storage configuration, or full query settings; these durations are historical reference observations, not warehouse estimates.
Common errors
| Symptom | Resolution |
|---|---|
| Connector not found | Ask VeloDB Cloud support to check that the compatible plugin is installed throughout the managed runtime. |
| Generated rows can be read but CTAS fails | Check destination write permissions, catalog write support, and storage connectivity. |
Clean up test data
Data generation consumes compute and destination storage. See Billing Overview. Drop only test tables you created, and remove external data using the destination catalog's documented deletion behavior.