# JOINs not working in Salesforce

**URL:** <https://community.cdata.com/t/joins-not-working-in-salesforce/848>\
**Category:** CData Virtuality \[Archived\]\
**Tags:** article, cdata-virtuality\
**Created:** [July 12, 2024, 5:07pm UTC](https://community.cdata.com/t/joins-not-working-in-salesforce/848 "2024-07-12T17:07:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@anonymous](https://community.cdata.com/u/anonymous)\
**Post date:** [July 12, 2024, 5:07pm UTC](https://community.cdata.com/t/joins-not-working-in-salesforce/848/1 "2024-07-12T17:07:51Z")

</div>

After adding a Salesforce data source, you can access your Salesforce account’s data in a relational manner. However, the Salesforce data model itself has a few limitations which do not exist in regular relational databases.

For example, Salesforce does not support JOINs&nbsp;between arbitrary tables. Tables involed in a JOIN must be in a&nbsp;parent-to-child or child-to-parent relationship. Otherwise, you will get the following error message:

ERROR at Row:1:Column:3071  
Didn’t understand relationship ‘custom\_table\_\_cs’ in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the ‘\_\_r’ after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

There are two options&nbsp;to circumvent this error:

1. Disable JOIN pushdown: By default, all JOINs are pushed down to Salesforce. You can disable this behaviour to let&nbsp;DataVirtuality calculate the JOIN in memory instead. This can be set by editingthe Salesforce data source and setting the Translator parameters to&nbsp;_SupportsOuterJoins=false,SupportsFullOuterJoins=false,SupportsInnerJoins=false_.
2. Materialize tables: The JOIN will only be pushed down to Salesforce, when both tables involved will be retrieved from Salesforce. If one of them is materialized, DataVirtuality will retrieve only the non-materialized table from Salesforce and perform the JOIN in memory. Since this needs to be considered for every possible JOIN, option 1 is usually the preferred way.
