Skip to content

Instantly share code, notes, and snippets.

[sqlfluff]
verbose = 0
nocolor = False
dialect = bigquery
templater = dbt
rules = None
exclude_rules = L034, L016, L044, L029,
recurse = 0
output_line_length = 100
runaway_limit = 10
@tjwaterman99
tjwaterman99 / ci.yml
Created March 20, 2021 06:22
Example CI/CD process for dbt on Snowflake
# For workflow syntax reference, please see the documentation available on Github
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: CI
on:
push:
schedule:
- cron: '50 11 * * *' # Run the `main` branch daily at 11:50am UTC
workflow_dispatch: # Allow the workflow to be triggered manually
@clrcrl
clrcrl / README.md
Last active September 3, 2023 07:42
dbt Workout — Using Jinja + SQL

Question on Slack:

Hello everyone! I have a Jinja DBT question! I have set a list and I'm looping over it.

{% set my_list= ["$apple",
"$avocado",
"tomato"] %}

I want now to loop over this list, retrive the data from each column (each item is a column name), and in the column name I want to remove the dollar symbol $. I was trying to do it with this code bellow:

@vidanov
vidanov / step-functions.md
Last active November 28, 2021 10:16
AWS Step functions. InputPath, OutputPath, ResultPath

AWS Step functions

InputPath, OutputPath, ResultPath

  • InputPath -> the part of the original JSON payload to take to the step
  • OutPutPath -> the part of the original JSON payload to return after the step is completed
  • ResultPath -> here you can define a node to store the output you create in the step.

Please note "output" node is visible in the step function logs and here in the doc, but you do not have it in the function input. It means { "output": "1.05" } will be just

@abelsonlive
abelsonlive / dbt_backfill.py
Created April 11, 2019 02:14
Script for backfilling DBT models which use partitions
#!/usr/bin/env python
import json
import copy
import sys
import argparse
from datetime import datetime, timedelta
from subprocess import Popen, PIPE
# dictionary of partiton names to variable generating functions
@voluntas
voluntas / loadtest.rst
Last active April 3, 2024 03:25
負荷試験コトハジメ
@mizchi
mizchi / how-hooks-work.md
Last active March 28, 2024 07:10
(翻訳) React Hooks は魔法ではなく、ただの配列だ

(翻訳) React Hooks は魔法ではなく、ただの配列だ

この記事は https://medium.com/@ryardley/react-hooks-not-magic-just-arrays-cd4f1857236e の日本語訳です。途中で力尽きて雑な翻訳になってる箇所がいくつかあります。


どのように Hooks が動いているか

私は、新しい Hooks の API の "magic" な挙動に悩んでいる人が結構いると聞いています。なのでこの構文の提案が、少なくとも表面的なレベルではどう動いているか、解説してみようと思います。

@davidrosenstark
davidrosenstark / SSMClient.java
Last active August 31, 2020 05:54
Java client to wrap access to AWS parameter store
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement;
import com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClient;
import com.amazonaws.services.simplesystemsmanagement.model.*;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@sirupsen
sirupsen / book.rb
Last active March 5, 2024 20:42
Script to import books from Instapaper to Airtable. Will not work out of the box.
class Book < Airrecord::Table
class Endorser < Airrecord::Table
self.base_key = ""
self.table_name = "Endorser"
end
self.base_key = ""
self.table_name = "Books"
has_many :endorsements, class: 'Book::Endorser', column: 'Endorsements'
@xuwei-k
xuwei-k / Example.scala
Last active November 16, 2018 08:57
msgpack4zとmsgpack4z-circeのサンプル
package example
import msgpack4z._
import msgpack4z.CodecInstances.all._
import scalaz.{\/-, -\/}
// テスト用case class
case class TestClass(foo: Int, bar: String)
object TestClass {