Skip to content

Commit

Permalink
Add TPC-H config files.
Browse files Browse the repository at this point in the history
  • Loading branch information
gamolina committed Jul 8, 2024
1 parent ab35e53 commit 4c9f4c9
Show file tree
Hide file tree
Showing 9 changed files with 397 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tpc-h-benchmark/config/customer/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
tableName: customer
primaryKey: c_custkey
selector: type="customer"
attributes:
- fieldName: c_custkey
sourceName: /data/c_custkey
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 1
columnID: true
- fieldName: c_name
sourceName: /data/c_name
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 2
- fieldName: c_address
sourceName: /data/c_address
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 3
- fieldName: c_nationkey
sourceName: /data/c_nationkey
mappingStrategy: ParentRelation
type: Integer
foreignKey: nation
sourceOrdinal: 4
- fieldName: c_phone
sourceName: /data/c_phone
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 5
- fieldName: c_acctbal
sourceName: /data/c_acctbal
mappingStrategy: FloatScaleBSI
type: Float
scale: 2
sourceOrdinal: 6
- fieldName: c_mktsegment
sourceName: /data/c_mktsegment
mappingStrategy: StringEnum
type: String
sourceOrdinal: 7
- fieldName: c_comment
sourceName: /data/c_comment
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 8
93 changes: 93 additions & 0 deletions tpc-h-benchmark/config/lineitem/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
tableName: lineitem
primaryKey: l_orderkey+l_linenumber
selector: type="lineitem"
timeQuantumType: YMD
timeQuantumField: l_commitdate
attributes:
- fieldName: l_orderkey
sourceName: /data/l_orderkey
mappingStrategy: ParentRelation
foreignKey: orders
type: Integer
sourceOrdinal: 1
- fieldName: l_partkey
sourceName: /data/l_partkey
mappingStrategy: ParentRelation
type: Integer
foreignKey: part
sourceOrdinal: 2
- fieldName: l_suppkey
sourceName: /data/l_suppkey
mappingStrategy: ParentRelation
type: Integer
foreignKey: supplier
sourceOrdinal: 3
- fieldName: l_linenumber
sourceName: /data/l_linenumber
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 4
- fieldName: l_quantity
sourceName: /data/l_quantity
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 5
- fieldName: l_extendedprice
sourceName: /data/l_extendedprice
mappingStrategy: FloatScaleBSI
type: Float
scale: 2
sourceOrdinal: 6
- fieldName: l_discount
sourceName: /data/l_discount
mappingStrategy: FloatScaleBSI
type: Float
scale: 2
sourceOrdinal: 7
- fieldName: l_tax
sourceName: /data/l_tax
mappingStrategy: FloatScaleBSI
type: Float
scale: 2
sourceOrdinal: 8
- fieldName: l_returnflag
sourceName: /data/l_returnflag
mappingStrategy: StringEnum
type: String
sourceOrdinal: 9
- fieldName: l_linestatus
sourceName: /data/l_linestatus
mappingStrategy: StringEnum
type: String
sourceOrdinal: 10
- fieldName: l_shipdate
sourceName: /data/l_shipdate
mappingStrategy: SysMillisBSI
type: DateTime
sourceOrdinal: 11
- fieldName: l_commitdate
sourceName: /data/l_commitdate
mappingStrategy: SysMillisBSI
type: DateTime
sourceOrdinal: 12
- fieldName: l_receiptdate
sourceName: /data/l_receiptdate
mappingStrategy: SysMillisBSI
type: DateTime
sourceOrdinal: 13
- fieldName: l_shipinstruct
sourceName: /data/l_shipinstruct
mappingStrategy: StringEnum
type: String
sourceOrdinal: 14
- fieldName: l_shipmode
sourceName: /data/l_shipmode
mappingStrategy: StringEnum
type: String
sourceOrdinal: 15
- fieldName: l_comment
sourceName: /data/l_comment
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 16

31 changes: 31 additions & 0 deletions tpc-h-benchmark/config/nation/schema.hold
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
tableName: nation
primaryKey: n_nationkey
selector: type="nation"
attributes:
- fieldName: n_nationkey
sourceName: /data/n_nationkey
mappingStrategy: StringHashBSI
#mappingStrategy: IntBSI
type: String
sourceOrdinal: 1
- fieldName: n_name
sourceName: /data/n_name
mappingStrategy: StringEnum
type: String
sourceOrdinal: 2
- fieldName: n_regionkey
sourceName: /data/n_regionkey
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 3
- fieldName: n_comment
sourceName: /data/n_comment
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 4
- fieldName: n_region_link
sourceName: /data/n_regionkey
mappingStrategy: ParentRelation
type: Integer
foreignKey: region
sourceOrdinal: 3
26 changes: 26 additions & 0 deletions tpc-h-benchmark/config/nation/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
tableName: nation
primaryKey: n_nationkey
selector: type="nation"
attributes:
- fieldName: n_nationkey
sourceName: /data/n_nationkey
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 1
columnID: true
- fieldName: n_name
sourceName: /data/n_name
mappingStrategy: StringEnum
type: String
sourceOrdinal: 2
- fieldName: n_regionkey
sourceName: /data/n_regionkey
mappingStrategy: ParentRelation
type: Integer
foreignKey: region
sourceOrdinal: 3
- fieldName: n_comment
sourceName: /data/n_comment
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 4
54 changes: 54 additions & 0 deletions tpc-h-benchmark/config/orders/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
tableName: orders
primaryKey: o_orderkey
selector: type="orders"
timeQuantumType: YMD
timeQuantumField: o_orderdate
attributes:
- fieldName: o_orderkey
sourceName: /data/o_orderkey
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 1
columnID: true
- fieldName: o_custkey
sourceName: /data/o_custkey
mappingStrategy: ParentRelation
type: Integer
foreignKey: customer
sourceOrdinal: 2
- fieldName: o_orderstatus
sourceName: /data/o_orderstatus
mappingStrategy: StringEnum
type: String
sourceOrdinal: 3
- fieldName: o_totalprice
sourceName: /data/o_totalprice
mappingStrategy: FloatScaleBSI
type: Float
scale: 2
sourceOrdinal: 4
- fieldName: o_orderdate
sourceName: /data/o_orderdate
mappingStrategy: SysMillisBSI
type: DateTime
sourceOrdinal: 5
- fieldName: o_orderpriority
sourceName: /data/o_orderpriority
mappingStrategy: StringEnum
type: String
sourceOrdinal: 6
- fieldName: o_clerk
sourceName: /data/o_clerk
mappingStrategy: StringEnum
type: String
sourceOrdinal: 7
- fieldName: o_shippriority
sourceName: /data/o_shippriority
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 8
- fieldName: o_comment
sourceName: /data/o_comment
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 9
51 changes: 51 additions & 0 deletions tpc-h-benchmark/config/part/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
tableName: part
primaryKey: p_partkey
selector: type="part"
attributes:
- fieldName: p_partkey
sourceName: /data/p_partkey
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 1
columnID: true
- fieldName: p_name
sourceName: /data/p_name
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 2
- fieldName: p_mfgr
sourceName: /data/p_mfgr
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 3
- fieldName: p_brand
sourceName: /data/p_brand
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 4
- fieldName: p_type
sourceName: /data/p_type
mappingStrategy: StringEnum
type: String
sourceOrdinal: 5
- fieldName: p_size
sourceName: /data/p_size
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 6
- fieldName: p_container
sourceName: /data/p_container
mappingStrategy: StringEnum
type: String
sourceOrdinal: 7
- fieldName: p_retailprice
sourceName: /data/p_retailprice
mappingStrategy: FloatScaleBSI
type: Float
scale: 2
sourceOrdinal: 8
- fieldName: p_comment
sourceName: /data/p_comment
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 9
32 changes: 32 additions & 0 deletions tpc-h-benchmark/config/partsupp/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
tableName: partsupp
primaryKey: ps_partkey+ps_suppkey
selector: type="partsupp"
attributes:
- fieldName: ps_partkey
sourceName: /data/ps_partkey
mappingStrategy: ParentRelation
type: Integer
foreignKey: part
sourceOrdinal: 1
- fieldName: ps_suppkey
sourceName: /data/ps_suppkey
mappingStrategy: ParentRelation
type: Integer
foreignKey: supplier
sourceOrdinal: 2
- fieldName: ps_availqty
sourceName: /data/ps_availqty
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 3
- fieldName: ps_supplycost
sourceName: /data/ps_supplycost
mappingStrategy: FloatScaleBSI
type: Float
scale: 2
sourceOrdinal: 4
- fieldName: ps_comment
sourceName: /data/ps_comment
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 5
21 changes: 21 additions & 0 deletions tpc-h-benchmark/config/region/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
tableName: region
primaryKey: r_regionkey
selector: type="region"
attributes:
- fieldName: r_regionkey
sourceName: /data/r_regionkey
#mappingStrategy: StringHashBSI
mappingStrategy: IntBSI
type: Integer
sourceOrdinal: 1
columnID: true
- fieldName: r_name
sourceName: /data/r_name
mappingStrategy: StringEnum
type: String
sourceOrdinal: 2
- fieldName: r_comment
sourceName: /data/r_comment
mappingStrategy: StringHashBSI
type: String
sourceOrdinal: 3
Loading

0 comments on commit 4c9f4c9

Please sign in to comment.