Skip to content

Instantly share code, notes, and snippets.

View sungchun12's full-sized avatar
🧃
Juicin' up these open source contributor muscles in full force!

Sung Won Chung sungchun12

🧃
Juicin' up these open source contributor muscles in full force!
View GitHub Profile
@sungchun12
sungchun12 / Dockerfile
Created July 16, 2023 20:30
quick setup for airflow using astro cli
FROM quay.io/astronomer/astro-runtime:7.6.0
# Install python packages
RUN pip install -r requirements.txt
# Switch to root user for installing git
USER root
# Install git
RUN apt-get update && apt-get install -y git
@sungchun12
sungchun12 / xdb_diff_demo.py
Created January 8, 2024 22:55
Demo script to run a Datafold Cloud xdb data diff between Databricks and Snowflake with simple API calls
"""
Demo script to run a xdb data diff between Databricks and Snowflake with simple API calls
"""
import os
import time
from pydantic import BaseModel
from typing import Any, List, Optional
import requests
from tabulate import tabulate
@sungchun12
sungchun12 / example.sql
Last active December 11, 2024 18:57
example sqlmesh macro
MODEL (
name tcloud_demo.example,
cron '0 13 * * *',
grain id,
kind INCREMENTAL_BY_TIME_RANGE (
time_column created_at
)
);
@DEF(nested_props, [
name: Tobiko Cloud CI/CD Bot
run-name: 🧃 Tobiko Cloud CI/CD Bot 🧃
on:
pull_request:
types:
- synchronize
- opened
# Required if using comments to issue commands to the bot
issue_comment:
@sungchun12
sungchun12 / config.yaml
Last active May 29, 2025 15:21
Tobiko Cloud CI/CD github actions configuration with oauth client
gateways:
tobiko_cloud: # this will use the config in tcloud.yaml for state_connection
scheduler: # TODO: add the connection info below into the Tobiko Cloud Connections Page with the service account json in plain text for this scheduler
type: cloud
default_catalog: sqlmesh-public-demo
connection: # This connection is used for automatic unit test generation, external model creation, and table diffing
type: bigquery
method: service-account-json
concurrent_tasks: 5
register_comments: true
@sungchun12
sungchun12 / config.yaml
Created May 14, 2025 22:26
bigquery example
gateways:
tobiko_cloud: # this will use the config in tcloud.yaml for state_connection
scheduler: # TODO: add the connection info below into the Tobiko Cloud Connections Page with the service account json in plain text for this scheduler
type: cloud
default_catalog: sqlmesh-public-demo
connection: # This connection is used for automatic unit test generation and external model creation
type: bigquery
method: service-account-json
concurrent_tasks: 5
register_comments: true
@sungchun12
sungchun12 / config.yaml
Last active July 30, 2025 17:22
SQLMesh Custom Linting Rule
gateways:
duckdb:
connection:
type: duckdb
database: db.db
snowflake:
connection:
type: duckdb
database: snowflake.db