-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create fabricspark-setup.md #5038
Draft
prdpsvs
wants to merge
9
commits into
dbt-labs:current
Choose a base branch
from
prdpsvs:patch-1
base: current
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8d27300
Create fabricspark-setup.md
prdpsvs 3466a6c
adding an entry under dbt-core for fabric spark
prdpsvs 8a622b1
Update vercel.json
prdpsvs 4c50775
Create fabricspark-configs.md
prdpsvs 6ac4c17
Merge branch 'current' into patch-1
mirnawong1 6e7c3e9
Merge branch 'current' into patch-1
mirnawong1 f96ff0c
Merge branch 'current' into patch-1
mirnawong1 64fccbc
Update website/sidebars.js
mirnawong1 f54f66c
Update website/docs/reference/resource-configs/fabricspark-configs.md
mirnawong1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
104 changes: 104 additions & 0 deletions
104
website/docs/docs/core/connect-data-platform/fabricspark-setup.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
--- | ||
title: "Microsoft Fabric Spark setup" | ||
description: "Read this guide to learn about the Microsoft Fabric Spark lakehouse setup in dbt." | ||
id: "fabricspark-setup" | ||
meta: | ||
maintained_by: Microsoft | ||
authors: 'Pradeep Srikakolapu' | ||
github_repo: 'microsoft/dbt-fabricspark' | ||
pypi_package: 'dbt-fabricspark' | ||
min_core_version: 'v1.7.0' | ||
cloud_support: Not Supported | ||
min_supported_version: 'n/a' | ||
slack_channel_name: 'db-fabric-synapse' | ||
slack_channel_link: 'https://app.slack.com/client/T0VLPD22H/C01DRQ178LQ' | ||
platform_name: 'Fabric Spark' | ||
config_page: '/reference/resource-configs/fabricspark-configs' | ||
--- | ||
|
||
|
||
<Snippet path="warehouse-setups-cloud-callout" /> | ||
<Snippet path="dbt-fabricspark-for-fabricspark" /> | ||
|
||
import SetUpPages from '/snippets/_setup-pages-intro.md'; | ||
|
||
<SetUpPages meta={frontMatter.meta} /> | ||
|
||
```zsh | ||
# livy connections | ||
$ python -m pip install "dbt-fabricspark" | ||
``` | ||
|
||
<h2> Configuring {frontMatter.meta.pypi_package} </h2> | ||
|
||
<p>For {frontMatter.meta.platform_name}-specific configuration please refer to <a href={frontMatter.meta.config_page}>{frontMatter.meta.platform_name} Configuration</a> </p> | ||
|
||
<p>For further info, refer to the GitHub repository: <a href={`https://github.com/${frontMatter.meta.github_repo}`}>{frontMatter.meta.github_repo}</a></p> | ||
|
||
## Connection Methods | ||
|
||
dbt-fabricspark can connect to Spark clusters using livy connections: | ||
|
||
- [`livy`](#livy) is the supported method to connect to Microsoft Fabric Data Engineering experience. It supports connecting to a job cluster. | ||
|
||
### LIVY | ||
|
||
Use the `livy` connection method to connect to Microsoft Fabric data engineering experience. | ||
|
||
<File name='~/.dbt/profiles.yml'> | ||
|
||
```yaml | ||
fabric-spark-profile: | ||
target: fabricspark-dev | ||
fabricspark-dev: | ||
authentication: CLI | ||
method: livy | ||
endpoint: https://api.fabric.microsoft.com/v1 | ||
workspaceid: [workspace id] | ||
lakehouseid: [lakehouse id] | ||
lakehouse: [lakehouse name] | ||
schema: [lakehouse name] | ||
threads: 1 | ||
type: fabricspark | ||
livy_session_parameter: | ||
"spark.driver.memory": "4g" | ||
``` | ||
|
||
</File> | ||
|
||
|
||
## Optional configurations | ||
|
||
### Retries | ||
|
||
Intermittent errors can crop up unexpectedly while running queries against Microsoft Fabric Spark. If `retry_all` is enabled, dbt-spark will naively retry any query that fails, based on the configuration supplied by `connect_timeout` and `connect_retries`. It does not attempt to determine if the query failure was transient or likely to succeed on retry. This configuration is recommended in production environments, where queries ought to be succeeding. | ||
|
||
For instance, this will instruct dbt to retry all failed queries up to 3 times, with a 5 second delay between each retry: | ||
|
||
<File name='~/.dbt/profiles.yml'> | ||
|
||
```yaml | ||
retry_all: true | ||
connect_timeout: 5 | ||
connect_retries: 3 | ||
``` | ||
|
||
</File> | ||
|
||
|
||
|
||
<VersionBlock firstVersion="1.7"> | ||
|
||
### Server side configuration (Livy Session Parameters) | ||
|
||
Fabric Spark can be customized using [Application Properties](https://spark.apache.org/docs/latest/configuration.html). Using these properties the execution can be customized, for example, to allocate more memory to the driver process. Also, the Spark SQL runtime can be set through these properties. For example, this allows the user to [set a Spark catalogs](https://spark.apache.org/docs/latest/configuration.html#spark-sql). | ||
</VersionBlock> | ||
|
||
## Caveats | ||
|
||
### Supported Functionality | ||
|
||
Delta-only features: | ||
1. Incremental model updates by `unique_key` instead of `partition_by` (see [`merge` strategy](/reference/resource-configs/spark-configs#the-merge-strategy)) | ||
2. [Snapshots](/docs/build/snapshots) | ||
3. [Persisting](/reference/resource-configs/persist_docs) column-level descriptions as database comments |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @prdpsvs - it doesn't look like there's a file for this snippet. is this something you're planning on adding? the deploy is failing bc it can't find fabricspark-for-fabricspark.md.