iris_backend / backend /inspect_schema_fixed.py
Saandraahh's picture
Implemented clustering
4b3a33f
import asyncio
import os
import json
from supabase import create_client
from dotenv import load_dotenv
load_dotenv()
SUPABASE_URL = os.environ.get("SUPABASE_URL")
SUPABASE_KEY = os.environ.get("SUPABASE_SERVICE_ROLE_KEY") or os.environ.get("SUPABASE_KEY")
client = create_client(SUPABASE_URL, SUPABASE_KEY)
async def inspect():
with open("schema_dump.txt", "w") as f:
f.write("--- Profile Embeddings ---\n")
p_res = client.table("profile_embeddings").select("*").limit(1).execute()
if p_res.data:
cols = sorted(p_res.data[0].keys())
for c in cols:
f.write(f"- {c}\n")
else:
f.write("No data\n")
f.write("\n--- Job Embeddings ---\n")
j_res = client.table("job_embeddings").select("*").limit(1).execute()
if j_res.data:
cols = sorted(j_res.data[0].keys())
for c in cols:
f.write(f"- {c}\n")
else:
f.write("No data\n")
if __name__ == "__main__":
asyncio.run(inspect())