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
"Proof connection at pyodbc level." | |
# Test pyodbc connection. Result is 42. | |
# Note parameters in connection string, <PARAMETER>. | |
import pyodbc | |
conn = pyodbc.connect('DRIVER=FreeTDS;SERVER=<IP_OR_HOSTNAME>;PORT=1433;DATABASE=<DATABASE_NAME>;UID=<USERNAME>;PWD=<PASSWORD>;TDS_Version=8.0;') | |
cursor = conn.cursor() | |
for row in cursor.execute('select 6 * 7 as [Result];'): |
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
class SomeExport(luigi.Task): | |
date = luigi.DateParameter(default=datetime.date.today()) | |
def output(self): | |
return luigi.s3.S3Target(self.date.strftime('s3://mybucket/%Y%m%d.txt.gz')) | |
def requires(self): | |
return None | |
def run(self): |