Convert Figma logo to code with AI

unionlabs logounion

The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.

49,441
2,505
49,441
311

Top Related Projects

10,355

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.

38,365

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

18,072

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.

12,337

An orchestration platform for the development, production, and observation of data assets.

1,914

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:

  1. Install Union:

    pip install union-data
    
  2. 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()
    
  3. Run the pipeline:

    python your_pipeline_script.py
    

For more advanced usage and configuration options, refer to the Union documentation.

Competitor Comparisons

10,355

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.

38,365

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.

18,072

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.

12,337

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.

1,914

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 Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Union

built with garnix Docs Discord badge Twitter handle

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

ComponentDescriptionLanguage(s)
uniondThe Union node implementation, using CometBLSGo
galoisdThe zero-knowledge prover implementationGo Gnark
voyagerModular hyper-performant cross-ecosystem relayerRust
hubbleMulti-ecosystem, GMP-enabled chain indexerRust
cosmwasmCosmWasm smart contract stackRust
light-clientsLight Clients for various ecosystemsRust
unionvisorNode supervisor intended for production usageRust
dripFaucet for Cosmos chains: app.union.build/faucetRust
evmEVM smart contract stackSolidity
appapp.union.buildTypeScript Svelte
siteunion.buildTypeScript Astro
TypeScript SDKTypeScript SDK for interacting with UnionTypeScript

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.