Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
Using JOINS with Supabase when no FK is present

I am running into issues with my querying when using supabase. I have this query which I can use successfully in DataGrip

SELECT
    sja.audience_id,
    sja.segment,
    relation,
    sjac.constraint_id,
    sjac.constraint_value,
    sjac.targeting
FROM signal_journey_audience_constraint_relations
JOIN signal_journey_audiences sja ON signal_journey_audience_constraint_relations.audience_id = sja.audience_id
JOIN signal_journey_audience_constraints sjac ON signal_journey_audience_constraint_relations.constraint_id = sjac.constraint_id

But when using supbase I can an error

async function getTableData() {
    const { data, error } = await supabase.from(
      'signal_journey_audience_constraint_relations'
    ).select(`
    audience_id:signal_journey_audiences(audience_id),
    segment:signal_journey_audiences(segment),
    relation,
    constraint_id:signal_journey_audience_constraints(constraint_id),
    constraint_value:signal_journey_audience_constraints(constraint_value),
    targeting:signal_journey_audience_constraints(targeting)
    ),
    `);

    if (data) {
      console.log(data);
      setTableData(data);
    } else {
      console.log(error);
    }
  }

Error is

hint: Verify that 'signal_journey_audience_constraint_re…ship was created, try reloading the schema cache.

message: Could not find a relationship between 'signal_journey_audience_constraint_relations' and 'signal_journey_audience_constraints' in the schema cache

I am getting confused to why I can run the query in DataGrip but not in Supbase. I'm 90% sure I just have some syntax issue but can't figure it out.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!