This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| '''Script to autogenerate dbt commands for changed models against a chosen git branch, | |
| with support for fully refreshing models with specific tags. | |
| Usage: | |
| $ python3 dbt_run_changed.py --target_branch master --target dev --commands [run, test] --full_refresh_tags [full_refresh] | |
| Assume model1 and model2 are changed models and model2 is tagged with "full_refresh". The script will generate three dbt commands: | |
| 1. dbt run --target dev --model model2 --full-refresh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.spark.SparkConf | |
| import org.apache.spark.sql.SparkSession | |
| import org.apache.spark.sql.types._ | |
| import org.slf4j.{Logger, LoggerFactory} | |
| object Main { | |
| val logger: Logger = LoggerFactory.getLogger(this.getClass) | |
| private lazy val sparkConf: SparkConf = new SparkConf() | |
| .setMaster("local[*]") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| CI script to check: | |
| 1. Models have both a unique and not_null test. | |
| 2. Models have a description and columns (i.e. a schema.yml entry) | |
| """ | |
| import json | |
| import logging | |
| import os | |
| import subprocess |
OlderNewer