Skip to content

Commit

Permalink
Merge branch 'ly-docs-ci-updates' of github.com:dbt-labs/docs.getdbt.…
Browse files Browse the repository at this point in the history
…com into ly-docs-ci-updates
  • Loading branch information
nghi-ly committed Sep 12, 2024
2 parents 7ba5b95 + 79ecef7 commit 2d097d1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions website/docs/docs/dbt-cloud-apis/sl-graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,3 +627,16 @@ mutation {
}
}
```

### Multi-hop joins

In cases where you need to query across multiple related tables (multi-hop joins), 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']) }}
```
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), 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 2d097d1

Please sign in to comment.