union
The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.
Top Related Projects
dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
An orchestration platform for the development, production, and observation of data assets.
Meltano: the declarative code-first data integration engine that powers your wildest data and ML-powered product ideas. Say goodbye to writing, maintaining, and scaling your own API integrations.
Always know what to expect from your data.
Quick Overview
Union is an open-source data integration platform that enables users to build and manage data pipelines. It provides a unified interface for connecting various data sources, transforming data, and loading it into different destinations. Union aims to simplify the process of data integration and make it accessible to a wider range of users.
Pros
- Unified interface for multiple data sources and destinations
- Extensible architecture allowing for custom connectors and transformations
- Built-in scheduling and monitoring capabilities
- Open-source nature allows for community contributions and customizations
Cons
- Relatively new project, which may lead to potential stability issues
- Limited documentation and community support compared to more established tools
- May require technical expertise for advanced configurations and custom integrations
- Performance may vary depending on the complexity of data pipelines
Code Examples
# Creating a simple data pipeline
from union import Pipeline, Source, Destination
pipeline = Pipeline()
source = Source("postgres", connection_string="postgresql://user:pass@host/db")
destination = Destination("s3", bucket="my-bucket", prefix="data/")
pipeline.add_source(source)
pipeline.add_destination(destination)
pipeline.run()
# Adding a transformation step
from union import Pipeline, Source, Destination, Transform
pipeline = Pipeline()
source = Source("mysql", connection_string="mysql://user:pass@host/db")
transform = Transform("sql", query="SELECT * FROM users WHERE active = true")
destination = Destination("bigquery", project="my-project", dataset="my_dataset")
pipeline.add_source(source)
pipeline.add_transform(transform)
pipeline.add_destination(destination)
pipeline.run()
# Scheduling a pipeline
from union import Pipeline, Schedule
pipeline = Pipeline()
# ... configure pipeline ...
schedule = Schedule("0 0 * * *") # Run daily at midnight
pipeline.set_schedule(schedule)
pipeline.save()
Getting Started
To get started with Union, follow these steps:
-
Install Union:
pip install union-data
-
Create a new pipeline:
from union import Pipeline, Source, Destination pipeline = Pipeline() source = Source("csv", file_path="data.csv") destination = Destination("postgres", connection_string="postgresql://user:pass@host/db") pipeline.add_source(source) pipeline.add_destination(destination) pipeline.run()
-
Run the pipeline:
python your_pipeline_script.py
For more advanced usage and configuration options, refer to the Union documentation.
Competitor Comparisons
dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
Pros of dbt-core
- More mature and widely adopted project with a larger community
- Extensive documentation and learning resources available
- Robust ecosystem of integrations and plugins
Cons of dbt-core
- Steeper learning curve for beginners
- More complex setup and configuration process
- Limited support for real-time data processing
Code Comparison
dbt-core:
models:
- name: my_model
columns:
- name: id
tests:
- unique
- not_null
Union:
@model
def my_model():
return """
SELECT id
FROM source_table
WHERE condition = true
"""
Union takes a more Python-centric approach, allowing users to define models using Python functions, while dbt-core uses YAML files for configuration and SQL for model definitions. This difference in approach may appeal to different types of users based on their preferred programming languages and workflow.
Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
Pros of Airflow
- Mature and widely adopted project with a large community and extensive documentation
- Supports a wide range of integrations and operators out-of-the-box
- Offers a rich web UI for monitoring and managing workflows
Cons of Airflow
- Can be complex to set up and configure, especially for smaller projects
- Requires significant resources to run, which may be overkill for simpler workflows
- Learning curve can be steep for new users due to its extensive feature set
Code Comparison
Airflow DAG definition:
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from datetime import datetime
def my_task():
print("Hello, Airflow!")
dag = DAG('example_dag', start_date=datetime(2023, 1, 1), schedule_interval='@daily')
task = PythonOperator(task_id='my_task', python_callable=my_task, dag=dag)
Union workflow definition:
from union import Workflow
def my_task():
print("Hello, Union!")
workflow = Workflow("example_workflow")
workflow.add_task(my_task)
The code comparison shows that Union offers a simpler, more concise syntax for defining workflows, which may be preferable for smaller projects or those new to workflow orchestration. Airflow's syntax is more verbose but provides greater flexibility and control over task execution and scheduling.
Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
Pros of Prefect
- More mature and established project with a larger community and ecosystem
- Offers both open-source and cloud-hosted options for flexibility
- Extensive documentation and tutorials for easier onboarding
Cons of Prefect
- Can be more complex to set up and configure for simple workflows
- Steeper learning curve for beginners compared to Union
- Heavier resource usage for small-scale projects
Code Comparison
Prefect workflow example:
from prefect import task, Flow
@task
def add(x, y):
return x + y
with Flow("Math") as flow:
result = add(1, 2)
flow.run()
Union workflow example:
from union import task, run
@task
def add(x, y):
return x + y
result = run(add(1, 2))
Union aims for simplicity and ease of use, while Prefect offers more advanced features and flexibility. The choice between the two depends on the specific requirements of your project and team's expertise.
An orchestration platform for the development, production, and observation of data assets.
Pros of Dagster
- More mature and established project with a larger community and ecosystem
- Comprehensive documentation and extensive tutorials
- Built-in support for data quality testing and observability
Cons of Dagster
- Steeper learning curve due to its extensive feature set
- Can be overkill for simpler data pipelines or smaller projects
- Requires more setup and configuration compared to Union
Code Comparison
Dagster:
@op
def hello_world():
return "Hello, World!"
@job
def my_job():
hello_world()
Union:
from union import task
@task()
def hello_world():
return "Hello, World!"
Union offers a simpler syntax for defining tasks, while Dagster provides a more structured approach with separate decorators for operations and jobs. Dagster's code structure allows for more complex pipeline definitions, but Union's simplicity may be preferable for straightforward tasks.
Both frameworks aim to simplify data pipeline management, but Dagster offers a more comprehensive solution with advanced features like data lineage and asset materialization. Union, being newer, focuses on simplicity and ease of use, making it potentially more accessible for developers new to data orchestration.
Meltano: the declarative code-first data integration engine that powers your wildest data and ML-powered product ideas. Say goodbye to writing, maintaining, and scaling your own API integrations.
Pros of Meltano
- More mature project with a larger community and contributor base
- Extensive documentation and tutorials for easier onboarding
- Supports a wider range of data sources and destinations out-of-the-box
Cons of Meltano
- Steeper learning curve due to more complex architecture
- Heavier resource requirements for deployment and operation
- Less flexible for custom integrations compared to Union's modular approach
Code Comparison
Meltano configuration (meltano.yml):
plugins:
extractors:
- name: tap-github
variant: meltanolabs
loaders:
- name: target-snowflake
variant: meltanolabs
Union configuration (union.yaml):
sources:
- name: github
type: github
destinations:
- name: snowflake
type: snowflake
While both frameworks use YAML for configuration, Union's approach is more concise and straightforward. Meltano's configuration offers more granular control but requires more detailed setup. Union's modular design allows for easier customization of sources and destinations, while Meltano provides a more structured plugin ecosystem.
Always know what to expect from your data.
Pros of Great Expectations
- More mature and established project with a larger community and extensive documentation
- Supports a wider range of data sources and integrations
- Offers a suite of pre-built expectations and a flexible framework for custom expectations
Cons of Great Expectations
- Steeper learning curve due to its extensive feature set
- Can be resource-intensive for large datasets
- Configuration and setup process can be complex for beginners
Code Comparison
Great Expectations:
import great_expectations as ge
df = ge.read_csv("data.csv")
expectation_suite = df.expect_column_values_to_be_between(
"age", min_value=0, max_value=120
)
validation_result = df.validate(expectation_suite=expectation_suite)
Union:
from union import expect
df = pd.read_csv("data.csv")
expect(df.age).to_be_between(0, 120)
Union offers a more concise and intuitive syntax for defining expectations, while Great Expectations provides a more comprehensive approach with additional configuration options.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Union is the hyper-efficient zero-knowledge infrastructure layer for general message passing, asset transfers, NFTs, and DeFi. Itâs based on Consensus Verification and has no dependencies on trusted third parties, oracles, multi-signatures, or MPC. It implements IBC for compatibility with Cosmos chains and connects to EVM chains like Ethereum, Berachain (beacon-kit), Arbitrum, and more.
The upgradability of contracts on other chains, connections, token configurations, and evolution of the protocol will all be controlled by decentralized governance, aligning the priorities of Union with its users, validators, and operators.
Components
Component | Description | Language(s) |
---|---|---|
uniond | The Union node implementation, using CometBLS | Go |
galoisd | The zero-knowledge prover implementation | Go Gnark |
voyager | Modular hyper-performant cross-ecosystem relayer | Rust |
hubble | Multi-ecosystem, GMP-enabled chain indexer | Rust |
cosmwasm | CosmWasm smart contract stack | Rust |
light-clients | Light Clients for various ecosystems | Rust |
unionvisor | Node supervisor intended for production usage | Rust |
drip | Faucet for Cosmos chains: app.union.build/faucet | Rust |
evm | EVM smart contract stack | Solidity |
app | app.union.build | TypeScript Svelte |
site | union.build | TypeScript Astro |
TypeScript SDK | TypeScript SDK for interacting with Union | TypeScript |
Quickstart
Install Nix to reproducibly build any component, and to enter a dev shell with all dependencies:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
(Note that some components can only be built on Linux. If you are using macOS, we recommend using OrbStack to easily set up a NixOS VM within two minutes. Most Union developers use macOS with OrbStack, and there is no need to install Nix inside of the NixOS VM.)
You can now reproducibly build any of Union's components from source:
nix build .#uniond -L
nix build .#voyager -L
nix build .#app -L
# to see all packages, run:
nix flake show
The result of whatever you build will be in result/
You can now also enter our dev shell, which has all of the dependencies (cargo
, rustc
, node
, go
, etc.) you need to work on any component:
(Don't worry, this will not affect your system outside of this repo)
nix develop
Run the following to format the entire repo and check your spelling before each PR:
nix run .#pre-commit -L
Check the #developers
channel on Union's discord if you need any help with this.
Docs
The official docs are hosted here. Each individual component also has accompanying developer documentation for contributors, which you can find in each README.md
.
Top Related Projects
dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
An orchestration platform for the development, production, and observation of data assets.
Meltano: the declarative code-first data integration engine that powers your wildest data and ML-powered product ideas. Say goodbye to writing, maintaining, and scaling your own API integrations.
Always know what to expect from your data.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot