Skip to content

Instantly share code, notes, and snippets.

View sgoley's full-sized avatar

sgoley sgoley

  • Remote
View GitHub Profile
@sgoley
sgoley / uuid_v4_excel_formula.txt
Created February 26, 2021 22:19 — forked from msubel/uuid_v4_excel_formula.txt
An Excel Fromula to generate a UUID v4
=LOWER(CONCATENATE(DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;4));4);"-";"4";DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(8;11));DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);DEC2HEX(RANDBETWEEN(0;POWER(16;4));4)))
@sgoley
sgoley / vacuum-analyze-dbtCloud.md
Last active August 24, 2020 13:17 — forked from jthandy/vacuum-analyze-sinter.md
Running vacuum and analyze on Redshift via dbtCloud

Running vacuum and analyze in dbtCloud

dbt and dbtCloud have the ability to run regular Redshift maintenance jobs. It's great to set these up early on in a project so that things stay clean as the project grows, and implementing these jobs in dbtCloud allows the same easy transparency and notifications as with your other dbt jobs.

This document will go through the specific steps necessary to configure vacuum and analyze jobs in the current version of dbt and dbtCloud. In the future, there will likely be a more idiomatically consistent way to express this logic using native dbt operations. Currently, this does work even if it is not elegant.

Step 1: Create the macros

macros/redshift_maintenance.sql

@sgoley
sgoley / condaenv.txt
Created June 24, 2020 16:42 — forked from pratos/condaenv.txt
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@sgoley
sgoley / app.R
Created September 22, 2017 15:55 — forked from edgararuiz-zz/app.R
library(shinydashboard)
library(dplyr)
library(dbplyr)
library(purrr)
library(shiny)
library(highcharter)
library(DT)
library(htmltools)
# Use the `config` package to get the credentials