Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.Advanced TutorialsBuild end-to-end workflows between two specific systems.API ReferenceCLI ReferenceRelease Notes
Version: 2.0.0

Concatenate Tables

Stack tables into one

how decides what concat() does when the inputs do not line up.

make a new table that takes the sales_east and sales_west tables and stacks their rows into one table

Needs a transformer. Getting its guide.

Called tabsdata 2 times (ctrl+o to expand)

Generating — concat() appends rows, and the default how="vertical" is right here because both inputs carry the same three columns with the same types.

Called tabsdata 3 times (ctrl+o to expand)

The transformer, registered in subscriptions:

@transformer(
input_tables=["sales_east", "sales_west"],
output_tables=["sales_all"],
)
def combine_sales(east: TableFrameSpec, west: TableFrameSpec) -> TableFrameSpec:
return concat([east, west])

Execution committed, 0 failures.

subscriptions/sales_all is live — 2 rows from sales_east then 2 from sales_west, in that order, columns unchanged:

┌────────┬───────┬────────┐
 region  month  amount 
├────────┼───────┼────────┤
 east    jan    10     
├────────┼───────┼────────┤
 east    feb    20     
├────────┼───────┼────────┤
 west    jan    30     
├────────┼───────┼────────┤
 west    feb    40     
└────────┴───────┴────────┘

Transformed tables

sales_east
regionmonthamount
eastjan10
eastfeb20
2 rows
sales_west
regionmonthamount
westjan30
westfeb40
2 rows
sales_all
regionmonthamount
eastjan10
eastfeb20
westjan30
westfeb40
4 rows
note

None entries in the list are skipped. A list that is None, empty, or empty once the None entries are dropped makes concat() return None, which leaves the output table on its current version instead of committing a new one.