add variables to .env-example

This commit is contained in:
Pablo Martin 2024-06-13 15:21:45 +02:00
parent 7867e73f10
commit 69f9ff1793
2 changed files with 7 additions and 5 deletions

View file

@ -1,2 +1,8 @@
XE_ACCOUNT_ID=<your-account-id-here>
XE_API_KEY=<your-api-key-here>
DWH_HOST=<db-host-here>
DWH_PORT=<db-port-here>
DWH_DB=<db-db-here>
DWH_USER=<db-user-here>
DWH_PASSWORD=<db-password-here>

View file

@ -68,11 +68,8 @@ class DWHRateWriter(RateWriter):
schema = DWH_SCHEMA
table = DWH_TABLE
self.connection.autocommit = False
try:
# Start a transaction
self.connection.autocommit = False
# Check if schema exists
cursor.execute(
sql.SQL(
"SELECT schema_name FROM information_schema.schemata WHERE schema_name = %s;"
@ -84,7 +81,6 @@ class DWHRateWriter(RateWriter):
if not schema_exists:
raise Exception(f"Schema '{schema}' does not exist.")
# Check if table exists
cursor.execute(
sql.SQL(
"SELECT table_name FROM information_schema.tables WHERE table_schema = %s AND table_name = %s;"