Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ jobs:
steps:
- halt_unless_core
- checkout
- run:
name: Install OS-level dependencies
command: ./.circleci/install-prerequisites.sh "<< parameters.engine >>"
- run:
name: Generate database name
command: |
Expand All @@ -247,6 +250,7 @@ jobs:
echo "export DATABRICKS_CATALOG='$TEST_DB_NAME'" >> "$BASH_ENV"
echo "export REDSHIFT_DATABASE='$TEST_DB_NAME'" >> "$BASH_ENV"
echo "export GCP_POSTGRES_DATABASE='$TEST_DB_NAME'" >> "$BASH_ENV"
echo "export FABRIC_DATABASE='$TEST_DB_NAME'" >> "$BASH_ENV"
- run:
name: Create test database
command: ./.circleci/manage-test-db.sh << parameters.engine >> "$TEST_DB_NAME" up
Expand Down Expand Up @@ -303,14 +307,13 @@ workflows:
- redshift
- bigquery
- clickhouse-cloud
- athena
# todo: enable fabric when cicd catalog create/drop implemented in manage-test-db.sh
#- fabric
- athena
- fabric
- gcp-postgres
filters:
branches:
only:
- main
#filters:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: uncomment prior to merge

# branches:
# only:
# - main
- ui_style
- ui_test
- vscode_test
Expand Down
11 changes: 10 additions & 1 deletion .circleci/install-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@ ENGINE_DEPENDENCIES=""

if [ "$ENGINE" == "spark" ]; then
ENGINE_DEPENDENCIES="default-jdk"
elif [ "$ENGINE" == "fabric" ]; then
echo "Installing Microsoft package repository"

# ref: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server
curl -sSL -O https://packages.microsoft.com/config/ubuntu/$(grep VERSION_ID /etc/os-release | cut -d '"' -f 2)/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

ENGINE_DEPENDENCIES="msodbcsql18"
fi

ALL_DEPENDENCIES="$COMMON_DEPENDENCIES $ENGINE_DEPENDENCIES"

echo "Installing OS-level dependencies: $ALL_DEPENDENCIES"

sudo apt-get clean && sudo apt-get -y update && sudo apt-get -y install $ALL_DEPENDENCIES
sudo apt-get clean && sudo apt-get -y update && sudo ACCEPT_EULA='Y' apt-get -y install $ALL_DEPENDENCIES

echo "All done"
19 changes: 19 additions & 0 deletions .circleci/manage-test-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,26 @@ gcp-postgres_down() {
gcp-postgres_exec "drop database $1"
}

# Fabric
fabric_init() {
python --version #note: as at 2025-08-20, ms-fabric-cli is pinned to Python >= 3.10, <3.13
pip install ms-fabric-cli

# to prevent the '[EncryptionFailed] An error occurred with the encrypted cache.' error
# ref: https://microsoft.github.io/fabric-cli/#switch-to-interactive-mode-optional
fab config set encryption_fallback_enabled true

echo "Logging in to Fabric"
fab auth login -u $FABRIC_CLIENT_ID -p $FABRIC_CLIENT_SECRET --tenant $FABRIC_TENANT_ID
}

fabric_up() {
fab create "SQLMesh CircleCI.Workspace/$1.Warehouse"
}

fabric_down() {
fab rm -f "SQLMesh CircleCI.Workspace/$1.Warehouse" || true
}

INIT_FUNC="${ENGINE}_init"
UP_FUNC="${ENGINE}_up"
Expand Down
3 changes: 3 additions & 0 deletions docs/integrations/engines/fabric.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Fabric

!!! info
The Fabric engine adapter is a community contribution. Due to this, only limited community support is available.

## Local/Built-in Scheduler
**Engine Adapter Type**: `fabric`

Expand Down
1 change: 1 addition & 0 deletions tests/core/engine_adapter/integration/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ gateways:
workspace_id: {{ env_var("FABRIC_WORKSPACE_ID") }}
odbc_properties:
Authentication: ActiveDirectoryServicePrincipal
check_import: false
state_connection:
type: duckdb

Expand Down