File size: 1,059 Bytes
4b3a33f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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())