Last active
January 29, 2022 14:11
-
-
Save martinyung/ba32885122a252e83439b0ccb65c858b to your computer and use it in GitHub Desktop.
python etl
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 variables import datawarehouse_name | |
# sql-server (target db, datawarehouse) | |
datawarehouse_db_config = { | |
'Trusted_Connection': 'yes', | |
'driver': '{SQL Server}', | |
'server': 'datawarehouse_sql_server', | |
'database': '{}'.format(datawarehouse_name), | |
'user': 'your_db_username', | |
'password': 'your_db_password', | |
'autocommit': True, | |
} | |
# sql-server (source db) | |
sqlserver_db_config = [ | |
{ | |
'Trusted_Connection': 'yes', | |
'driver': '{SQL Server}', | |
'server': 'your_sql_server', | |
'database': 'db1', | |
'user': 'your_db_username', | |
'password': 'your_db_password', | |
'autocommit': True, | |
} | |
] | |
# mysql | |
mysql_db_config = [ | |
{ | |
'user': 'your_user_1', | |
'password': 'your_password_1', | |
'host': 'db_connection_string_1', | |
'database': 'db_1', | |
}, | |
{ | |
'user': 'your_user_2', | |
'password': 'your_password_2', | |
'host': 'db_connection_string_2', | |
'database': 'db_2', | |
}, | |
] | |
# firebird | |
fdb_db_config = [ | |
{ | |
'dsn': "/your/path/to/source.db", | |
'user': "your_username", | |
'password': "your_password", | |
} | |
] |
Can you please tell me the contents in the module "datawarehouse_name".
The one which you imported.
thanks @greg-amato, i have updated it.
@sbiswas19 you can refer to my blog post to get the full picture. https://codeburst.io/using-python-script-for-data-etl-53138c567906
Thanks @martinyung
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool share on Codeburst!!
Copying as a template and noticed missing commas on line 8 and 20. Cheers!