iris_backend / backend /get_test_ids.py
Saandraahh's picture
Added AI score and Insights
35709fb
import os
from supabase import create_client
from dotenv import load_dotenv
load_dotenv()
url = os.environ.get("SUPABASE_URL")
key = os.environ.get("SUPABASE_SERVICE_ROLE_KEY")
supabase = create_client(url, key)
try:
# Get an application with user and job relations
res = supabase.table("applications").select("user_id, job_id").limit(1).execute()
if res.data:
app = res.data[0]
# In this project, user_id might be the profile id
print(f"Candidate ID (profile): {app['user_id']}")
print(f"Job ID: {app['job_id']}")
else:
print("No applications found.")
except Exception as e:
print(f"Error: {e}")