Closed kadnan closed 2 years ago
Hi @kadnan,
the code that configures the databases needs to run before the pipeline in the same Pyhon process:
mara_db.config.databases \
= lambda: {'mara': mara_db.dbs.PostgreSQLDB(
host='localhost',
user='postgres',
password='postgres',
database='example_etl_mara')}
The run_pipeline
needs this configuration to connect to the right database. So I think the problem is to have two separate files / databases.
@martin-loetzsch does the mara_db.auto_migration.auto_discover_models_and_migrate()
supposed to create necessary tables ?
@kadnan The code part mara_db.auto_migration.auto_discover_models_and_migrate()
as @hemanth7787 mentioned are required only once to make sure that the necessary mara tables are created in the database.
The code part mara_db.config.databases = lambda: ...
is necessary on each pipeline run. This configures the mara database connection to mara.
I will close this issue now since it is quite old and seems to be outdated. Feel free to open it again.
Hi
I am trying Mara very first time. Pretty good. From the demo, I am running the following code but getting the error
I had create a separate
.py
file in which I used the code to setup dbIt worked well and created db. Now it is not clear whether I have to run this code while running pipeline too?
Thanks