Spaces:
Sleeping
Sleeping
File size: 585 Bytes
35709fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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 one profile
p_res = supabase.table("profiles").select("id").limit(1).execute()
# Get one job
j_res = supabase.table("jobs").select("id").limit(1).execute()
if p_res.data and j_res.data:
print(f"CANDIDATE_ID={p_res.data[0]['id']}")
print(f"JOB_ID={j_res.data[0]['id']}")
except Exception as e:
print(f"Error: {e}")
|