Skip to content

Instantly share code, notes, and snippets.

@robconery
Created September 28, 2023 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robconery/2d2aa978c8efaea60256f62f868eeecf to your computer and use it in GitHub Desktop.
Save robconery/2d2aa978c8efaea60256f62f868eeecf to your computer and use it in GitHub Desktop.
SQL Extraction Intro

We need to setup our dev environment (quickly) with a few bash commands:

mkdir cassini
cd cassini
mkdir csvs
touch csvs/import.sql
touch README.md
createdb cassini

These commands will create our working directories and, most importantly, a document where we can log what we've done and why we did it. That's really important for our future selves and teammates.

To pull out the names of the columns in our CSV we use the head command:

head -1 csvs/master_plan.csv

This will display the first row of our CSV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment