Skip to main content

Visual table merge tool for Streamlit

Project description

streamlit-merge-tables is a Streamlit custom component that allows users to visually define merge (join) logic across multiple tables using an interactive UI.

The component does not merge data directly. Instead, it returns a merge plan (dictionary) describing how tables should be joined, leaving execution fully under developer control.

Features

Visual table merge builder

Chain and pairwise merge modes

Multiple join types: INNER, LEFT, RIGHT, OUTER

Column-level join key selection

Built-in validation

Optional DAG visualization of merge flow

Framework-agnostic merge execution (pandas, SQL, backend APIs)

Installation From PyPI pip install streamlit-merge-tables

From GitHub git clone https://github.com/linhnt-hub/streamlit-merge-tables.git cd streamlit-merge-tables pip install .

Quick Start (5-minute example) import streamlit as st import pandas as pd from streamlit_component import merge_tables

Example data

df_interfaces = pd.DataFrame({ "ifname": ["ge-0/0/0", "ge-0/0/1"], "speed": [1000, 1000], "status": ["up", "down"], })

df_traffic = pd.DataFrame({ "ifname": ["ge-0/0/0"], "bps": [1234], })

tables = [ { "id": "interfaces", "name": "Interfaces", "columns": list(df_interfaces.columns), }, { "id": "traffic", "name": "Traffic", "columns": list(df_traffic.columns), }, ]

merge_plan = merge_tables(tables=tables, dag=True)

st.subheader("Merge plan") st.json(merge_plan)

At this point:

Users configure merge logic in the UI

merge_plan updates automatically

You decide how and when to execute the merge

Tables Schema tables = [ { "id": "interfaces", "name": "Interfaces", "columns": ["ifname", "speed", "status"], } ]

Field Description id Unique internal identifier name Display name in UI columns Column names Merge Plan Output { "mode": "chain", "steps": [ { "leftTableId": "interfaces", "rightTableId": "traffic", "leftKeys": ["ifname"], "rightKeys": ["ifname"], "joinType": "inner" } ] }

Developer Notes

The component never touches your DataFrames

It only emits merge logic

Perfect for:

pandas merges

SQL JOIN builders

Backend-driven pipelines

No-code / low-code tools

Example: Execute Merge with pandas result = pd.merge( df_interfaces, df_traffic, left_on=["ifname"], right_on=["ifname"], how="inner", )

Screenshots & Demo

Add screenshots or GIFs here for GitHub:

Merge UI overview

Join key selection

DAG visualization

Recommended format:

docs/images/merge-ui.png docs/images/merge-dag.gif

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_merge_tables-1.0.2.tar.gz (162.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_merge_tables-1.0.2-py3-none-any.whl (162.4 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_merge_tables-1.0.2.tar.gz.

File metadata

  • Download URL: streamlit_merge_tables-1.0.2.tar.gz
  • Upload date:
  • Size: 162.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for streamlit_merge_tables-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ee020143f6cc573971a556e4afcd413bf28f72183079762ea576cc431548845c
MD5 7a1c6669e910fb62fccc6fe1f22ece13
BLAKE2b-256 b66e683a992eb17802c2603120509e61793e64f3ca1a07bfd1dfbb9a989195c2

See more details on using hashes here.

File details

Details for the file streamlit_merge_tables-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_merge_tables-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b597a9cf9c3613e36d24600bccf2bccbd95440769afcb40b2076909de0587440
MD5 134909e3edcd0c641dfb88afa9885b9d
BLAKE2b-256 b4d539d7afad6c4d41b4383b08e0eb3864fa20cdaa3cbc5e6112476fb86b0ac8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page