import sqlite3
import os

db_path = 'd:/workspace/AuraK/server/database.sqlite'
if not os.path.exists(db_path):
    print("DB not found")
    exit(1)

conn = sqlite3.connect(db_path)
c = conn.cursor()

print("--- knowledge_group ---")
try:
    for row in c.execute('SELECT id, name, tenantId from knowledge_group'):
        print(row)
except Exception as e:
    print(e)
    
print("\n--- import_task ---")
try:
    for row in c.execute('SELECT id, targetGroupId, targetGroupName, status from import_task'):
        print(row)
except Exception as e:
    print(e)

conn.close()
