|
@@ -2,7 +2,8 @@ import json
|
|
|
from pathlib import Path
|
|
|
|
|
|
import pandas as pd
|
|
|
-from model import DatabaseInspect, create_db_ini, load_config
|
|
|
+
|
|
|
+from database.model import DatabaseInspect, create_db_ini, load_config
|
|
|
|
|
|
|
|
|
def get_import_config(filename: str, db_name: str):
|
|
@@ -137,7 +138,7 @@ def create(config_file: str = "database/CARLO.json"):
|
|
|
f.write(f' call bcp_in.bat "{table_client}" "[temp].[{current_table["dest"]}]" "{cfg.temp_db}"\n\n')
|
|
|
|
|
|
insert_query = f"INSERT INTO {full_table_name} SELECT * FROM {temp_table_name} T1"
|
|
|
- pkey = dest_db.get_pkey(current_table["dest"])
|
|
|
+ pkey = dest_db.get_pkey(current_table["dest"], current_table["dest_db"])
|
|
|
if len(pkey) == 0:
|
|
|
print(current_table["dest"] + " hat keinen Primaerschluessel")
|
|
|
f.write(f" rem {current_table['dest']} hat keinen Primaerschluessel")
|