Skip to content

Instantly share code, notes, and snippets.

View Altons's full-sized avatar

Alberto Negron Altons

View GitHub Profile
@Altons
Altons / Brewfile
Last active December 16, 2024 20:21
List of most have tools for my laptop
# frozen_string_literal: true
# tap "heroku/brew"
# tap 'homebrew/bundle'
# tap 'homebrew/cask'
# tap 'homebrew/cask-versions'
# tap 'homebrew/core'
# tap "stripe/stripe-cli"
brew 'icu4c'
brew 'gcc'
@Altons
Altons / JaroWinklerStringSimilarity.sql
Created March 29, 2021 18:32 — forked from paulirwin/JaroWinklerStringSimilarity.sql
Jaro-Winkler String Similarity in T-SQL
-- Based on code here: http://www.sqlservercentral.com/articles/Fuzzy+Match/65702/
-- Modified to be used in SQL Server Database Projects or run on its own, and fixed similarity vs distance confusion
CREATE FUNCTION [dbo].JaroWinklerGetCommonCharacters(@firstWord VARCHAR(MAX), @secondWord VARCHAR(MAX), @matchWindow INT)
RETURNS VARCHAR(MAX) AS
BEGIN
DECLARE @CommonChars VARCHAR(MAX)
DECLARE @copy VARCHAR(MAX)
DECLARE @char CHAR(1)
DECLARE @foundIT BIT
@Altons
Altons / dag.py
Created August 5, 2021 11:19 — forked from adamhaney/dag.py
DBT Airflow DAG with model/graph introspection
from datetime import datetime, timedelta
import networkx as nx
from airflow import DAG
from airflow.operators import BashOperator, SubDagOperator
start_date = datetime(year=2017, month=6, day=13, hour=19, minute=0)
schedule_interval = '0 * * * 1-5'
default_args = {
@Altons
Altons / README.md
Created October 31, 2022 11:28 — forked from jeremyyeo/README.md
Building SCD-2 models using the default incremental materialization #dbt

Building SCD-2 models using the default incremental materialization

  1. Bootstrap the source / snapshot table source_users and the initial state of our scd2 table dim_users by running:
dbt run -m source_users dim_users
  1. Copy over contents of dim_users_inc.sql replacing contents in dim_users.sql (or just rename them). Then run: