Skip to content

Instantly share code, notes, and snippets.

@cnolanminich
cnolanminich / example_cluster_role.yaml
Created June 28, 2024 00:50
Permissions needed for cross-namespace
# give the created service account cross namespace permissions (cluster role)
extraManifests:
- kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: extra-cluster-role
rules:
- apiGroups: ["batch"]
resources: ["jobs", "jobs/status"]
verbs: ["*"]
@cnolanminich
cnolanminich / asset_group1.py
Last active June 18, 2024 19:54
Example of assets that take deps from a set of other assets
#assets you want to put in the initial asset group
from dagster import (
asset,
)
# Define your assets and group them
@asset
def asset1():
pass
@cnolanminich
cnolanminich / example_snowflake_sensor.md
Last active June 12, 2024 01:39
Execute a Snowflake job based on whether a table has been updated

Step 1: Define the Snowflake Resource

from dagster import (
    Definitions,
    AssetKey,
    RunRequest,
    SensorEvaluationContext,
    AssetExecutionContext,
@cnolanminich
cnolanminich / example_singular_test.sql
Created April 11, 2024 23:30
singular dbt test with more than 1 ref with config needed
{{ config(
severity = 'warn',
meta = {
'dagster': {
'ref': {
'name': 'orders_cleaned'
}
}
}
)
@cnolanminich
cnolanminich / deploy-dagster-cloud.yml
Last active March 18, 2024 19:20
Use GitHub Labels to use a different AWS Account
# modified by https://github.com/dagster-io/hooli-data-eng-pipelines/blob/christian-test-amp/.github/workflows/deploy-dagster-cloud.yml
name: Dagster Cloud Hybrid Deployment
on:
push: # For full deployment
branches:
- "main"
- "master"
pull_request: # For branch deployments
types: [opened, synchronize, reopened, closed]
@cnolanminich
cnolanminich / how_we_set_up_our_shiny_server.md
Created September 21, 2018 19:03
How we set up our shiny server

How We Set Up Our Shiny Servey

Author: Christian Minich

Date: 2017-01-18

Recently we stood up a series of Shiny apps on our linux server, three of which you can find below:

  • SERVER/apps/or_prediction
  • SERVER/apps/rocqi_tutorials
  • SERVER/apps/spc_template