microsoft / microsoft/DacFx

SqlPackage: Add option to exclude or only include certain object types (to enable use with Fabric read only SQL endpoints)

Open
#541 6 comments 0 reactions 0 assignees View on GitHub
enhancement sqldw
Dominant language
C#
Stars
460
Forks
29
Avg merge
4d 9h
Merged PRs (30d)
7

Description

**Is your feature request related to a problem? Please describe.**
In Fabric, a lakehouse automatically receives a read only SQL endpoint. In this SQL endpoint, the user can create _non-table_ objects, such as views or functions. However, tables **cannot** be created. This is because the endpoint's tables are auto-managed by the lakehouse.

Problem I encountered was when I tried to use SqlPackage to move the objects I created between two endpoints. When assembling its output, SqlPackage wanted to include tables. However, in the context of a read-only endpoint, this is inappropriate because tables cannot be directly created by users (including user tools like SqlPackage).

**Describe the solution you'd like**
For SqlPackage to offer a command-line option that allows the user to specify which object types to include or to ignore. This way, when using SqlPackage with a read only endpoint, I could tell it to ignore all tables.

Example:

- /ignoretype:table (would include all object types but table)
- /includetype:view (would ignore all object types except for views)

Contributor guide

Open the contributing guide

Research direction

Start by tracing SqlPackage's command-line option handling and the output assembly path; the issue names no files or tests. Define how include and ignore selections should interact across object types, then add coverage showing that table objects can be excluded while views and functions remain included for Fabric read-only SQL endpoints.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
cli, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.