Skip to content

Instantly share code, notes, and snippets.

{
templates: {
'pal-positions' => {
context_text: 'Guns, Germs and Steel',
default_url_options: {"utm_campaign"=>"pal-positions", "utm_source"=>"causes-email", "utm_medium"=>"email-pal"},
},
'pal-topics_support' => {
context_text: 'Bob eats lunch',
default_url_options: {"utm_campaign"=>"pal-topics_support", "utm_source"=>"causes-email", "utm_medium"=>"email-pal"},
}
@jimhe
jimhe / mysql_to_big_query.sh
Last active February 2, 2017 01:30 — forked from shantanuo/mysql_to_big_query.sh
Copy MySQL table to big query. If you need to copy all tables, use the loop given at the end.Exit with error code 3 if blob or text columns are found. The csv files are first copied to google cloud before being imported to big query.
#!/bin/sh
MYSQL_USER=$1
MYSQL_PASSWORD=$2
MYSQL_HOST=$3
TABLE_SCHEMA=$4
TABLE_NAME=$5
gsutil > /dev/null 2>&1 || {
echo "gsutil not available! Please install google-cloud-sdk: brew cask install google-cloud-sdk"