apache_beam.testing.benchmarks.tpcds.tpcds_schemas module

TPC-DS table schemas and row converters for Beam Python SQL.

apache_beam.testing.benchmarks.tpcds.tpcds_schemas.get_raw_table_schema(table_name: str) → List[Tuple[str, str]][source]

Returns the list of (column_name, raw_type) for a TPC-DS table from tpcds/build/schemas.

apache_beam.testing.benchmarks.tpcds.tpcds_schemas.get_all_table_names() → List[str][source]

Returns sorted list of all TPC-DS table names from tpcds/build/schemas.

apache_beam.testing.benchmarks.tpcds.tpcds_schemas.get_table_row_class(table_name: str) → Type[Tuple[Any, ...]][source]

Returns a NamedTuple class registered with RowCoder for the given table.

apache_beam.testing.benchmarks.tpcds.tpcds_schemas.coerce_value(val: Any, raw_type: str) → Any[source]

Coerces a Python or string value to match the target column type.

apache_beam.testing.benchmarks.tpcds.tpcds_schemas.parse_csv_line(table_name: str, line: str, delimiter: str = '|') → Any | None[source]

Parses a TPC-DS .dat pipe-delimited line into a typed NamedTuple row.