This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
# This has two assumptions | |
# 1. Virtual environment set up in ~/venv/{project-name} | |
# 2. Configuration for configuration set up in ~/salt/{project-name} | |
# Given the name of the project as parameter | |
# $jwenv mini-batch | |
function project_name { | |
if [ -z $1 ]; | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import boto3 | |
import urllib | |
import os | |
import psycopg2 | |
print('Loading function') | |
s3_client = boto3.client('s3') | |
s3_object = boto3.resource('s3') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import boto3 | |
import urllib | |
import os | |
import psycopg2 | |
print('Loading function') | |
s3_client = boto3.client('s3') | |
s3_object = boto3.resource('s3') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def upload(csv: File): Unit = { | |
val conn = dBUtil.getJDBC | |
val tableName = "weather" | |
// Export table as CSV using the /copy command | |
val copyManager = new CopyManager(conn.asInstanceOf[BaseConnection]) | |
val currentDirectory = new java.io.File(".").getCanonicalPath | |
println(currentDirectory) |