Skip to content

Commit

Permalink
Update sl-jdbc.md
Browse files Browse the repository at this point in the history
adding multi-hop syntax [per internal slack thread](https://dbt-labs.slack.com/archives/C03KHQRQUBX/p1725626988152529)
  • Loading branch information
mirnawong1 authored Sep 10, 2024
1 parent 04bafea commit 5960e45
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions website/docs/docs/dbt-cloud-apis/sl-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,19 @@ select * from {{ semantic_layer.query(saved_query="new_customer_orders", limit=5
The JDBC API will use the saved query (`new_customer_orders`) as defined and apply a limit of 5 records.
### Multi-hop joins
In cases where you need to query across multiple related tables (multi-hop joins), you can use the `entity_path` argument to specify the path between related entities. The following are examples of how you can define these joins:
- In this example, you're querying the `location_name` dimension but specifying that it should be joined using the `order_id` field.
```sql
{{Dimension('location__location_name', entity_path=['order_id'])}}
```
- In this example, the `salesforce_account_owner` dimension is joined to the `region` field, with the path going through `salesforce_account`.
```sql
{{ Dimension('salesforce_account_owner__region',['salesforce_account']) }}
```
## FAQs
<FAQ path="Troubleshooting/sl-alpn-error" />
Expand Down

0 comments on commit 5960e45

Please sign in to comment.