Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d1675c2
Add fab find command for catalog search API
Feb 8, 2026
ab0d8f5
feat(find): address feedback - nargs+, remove endpoint, add error han…
Feb 10, 2026
e8c0c3e
feat(find): add tab-completion for --type flag
Feb 10, 2026
8e215d7
feat(find): add --limit validation (1-1000)
Feb 10, 2026
51d4102
feat(find): use custom validation for cleaner error messages
Feb 10, 2026
e03159c
fix(find): fix API integration issues
Feb 10, 2026
fba2856
fix(find): correct print_output_format call for table display
Feb 10, 2026
94b9baf
feat(find): add key-value layout for --detailed flag
Feb 10, 2026
235a93f
refactor(find): change --detailed to -l/--long to match CLI convention
Feb 10, 2026
8455e26
feat(find): hide empty keys in long output
Feb 10, 2026
9d02732
refactor(find): reorder long output fields (name, id, type, workspace…
Feb 10, 2026
78e2c70
feat(find): add blank line separator before results
Feb 10, 2026
16d4ac1
feat(find): add blank line before count message
Feb 10, 2026
e18c7dc
feat(find): add --continue flag for pagination
Feb 10, 2026
5eedfd2
fix(find): fix --continue to not duplicate search/filter params
Feb 10, 2026
de710cb
refactor(find): rename flags to --max-items and --next-token
Feb 10, 2026
8654d39
feat(find): hide description column when all descriptions are empty
Feb 11, 2026
40224e1
fix(find): remove Scorecard from unsupported types (returned as Report)
Feb 11, 2026
e546cc6
fix(find): remove Dataflow from unsupported types (Gen2 CI/CD is sear…
Feb 11, 2026
767b22c
docs(find): clarify Dataflow Gen1/Gen2 are not searchable
Feb 11, 2026
21664e5
docs(find): add 'currently' to Dataflow note
Feb 11, 2026
cba4884
refactor(find): replace --next-token/--type/--max-items with auto-pag…
Feb 24, 2026
b7fc99c
test(find): update tests for pagination and -P params refactor
Feb 24, 2026
090711c
fix(find): make -P type filter case-insensitive
Mar 3, 2026
73230bc
fix(find): treat empty continuation token as end of results
Mar 3, 2026
1eacc56
fix(find): truncate descriptions to fit terminal width
Mar 3, 2026
596f799
feat(find): paginate all results in command-line mode
Mar 3, 2026
03e00f9
fix(find): improve error messages per Microsoft Writing Style Guide
Mar 4, 2026
3872f30
Delete issue-172.md
nadavs123 Mar 15, 2026
8025c05
Address PR #174 review feedback
Mar 16, 2026
f9e82ae
Add e2e VCR test skeleton for find command
Mar 16, 2026
494e0e9
fix: patch PromptSession before singleton instantiation on Windows
Mar 16, 2026
f25c08b
fix: e2e tests — mock input, normalize cassette URLs, fix assertions
Mar 16, 2026
7fc29a0
test: remove TestFindCommandline and TestFindInteractive (covered by …
Mar 16, 2026
fa04acd
refactor: use table output for -l instead of key-value list
Mar 18, 2026
05c2ecd
docs: update find.md for table-based -l output
Mar 18, 2026
3ccb430
Address round 2 review: adopt get_dict_from_params, common errors, te…
Mar 19, 2026
531c42a
Convert unit tests to e2e: param validation and JMESPath
Mar 19, 2026
748db99
Expand e2e coverage, remove redundant unit tests
Mar 19, 2026
fe0f483
Address round 3 review: max_depth, cassette sanitization, config cleanup
Mar 24, 2026
be2fb2e
Add forward-compatible workspace hierarchy parsing
Mar 25, 2026
1dc4528
Smart column truncation and running total for pagination
Mar 29, 2026
a2b398a
Address review rounds 3-4: restructure tests, source improvements
Apr 13, 2026
3ad3074
Polish: pagination, summary count, error hints, empty line after table
Apr 13, 2026
eae5f44
Address PR review: fix bugs, packaging, and code quality
Apr 13, 2026
d22206f
Simplify search status message to 'Searching...'
Apr 14, 2026
66ff3de
Tighten fab_find: simplify filter builder, dedup pagination, remove d…
Apr 14, 2026
028bef1
Address reviewer feedback: loops, _parse_response, output_format
Apr 15, 2026
6022c7f
Address Copilot review: truncation in fab_ui, padding fix, UTF-8
Apr 15, 2026
4f6a14c
refactor: restructure fetch loops and handle empty JMESPath results
Apr 16, 2026
09005a5
Refine _display_page helper and add pagination e2e tests
Apr 16, 2026
9540d57
Skip synthetic cassette tests during VCR re-recording
Apr 16, 2026
e658e68
Re-record VCR cassettes with scrubbed tenant data
Apr 17, 2026
eea31f9
Remove unused imports in test_find.py
Apr 17, 2026
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
6 changes: 6 additions & 0 deletions .changes/unreleased/added-20260209-171617.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: added
body: Add new 'fab find' command for searching the Fabric catalog across workspaces
time: 2026-02-09T17:16:17.2056327+02:00
custom:
Author: nschachter
AuthorLink: https://github.com/nschachter
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include src/fabric_cli/core/fab_config/command_support.yaml
include src/fabric_cli/commands/find/type_supported.yaml
recursive-include src/fabric_cli/commands/fs/payloads *
55 changes: 55 additions & 0 deletions docs/commands/find.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# `find` Command

Search the Fabric catalog for items across all workspaces.

**Usage:**

```
fab find <query> [-P <params>] [-l] [-q <query>]
```

**Parameters:**

- `<query>`: Search text. Matches display name, description, and workspace name.
- `-P, --params`: Filter parameters in `key=value` or `key!=value` format. Use brackets for multiple values: `type=[Lakehouse,Notebook]`. Use `!=` to exclude: `type!=Dashboard`.
- `-l, --long`: Show detailed table with IDs (name, id, type, workspace, workspace_id, description). Optional.
- `-q, --query`: JMESPath query to filter results client-side. Optional.

**Examples:**

```
# search for items by name or description
fab find 'sales report'

# search for lakehouses only
fab find 'data' -P type=Lakehouse

# search for multiple item types (bracket syntax)
fab find 'dashboard' -P type=[Report,SemanticModel]
Comment thread
aviatco marked this conversation as resolved.

# exclude a type
fab find 'data' -P type!=Dashboard

# show detailed output with IDs
fab find 'sales' -l

# combine filters
fab find 'finance' -P type=[Warehouse,Lakehouse] -l

# project specific fields
fab find 'data' -q "[].{name: name, workspace: workspace}"
```

**Behavior:**

- In interactive mode (`fab` shell), results are paged 50 at a time with "Press Enter to continue..." prompts.
- In command-line mode (`fab find ...`), all results are fetched in a single pass (up to 1000 per API call).
- Type names are case-insensitive. `type=lakehouse` matches `Lakehouse`.
- The `-q` JMESPath filter is applied client-side after results are returned from the API.

**Supported filter parameters:**

| Parameter | Description |
|-----------|-------------|
| `type` | Filter by item type. Supports `eq` (default) and `ne` (`!=`) operators. |

Comment thread
nadavs123 marked this conversation as resolved.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ package-data = { "fabric_cli.core.fab_config" = [
"command_support.yaml",
], "fabric_cli.commands.fs" = [
"payloads/*",
], "fabric_cli.commands.find" = [
"type_supported.yaml",
] }

[tool.mypy]
Expand Down
47 changes: 47 additions & 0 deletions src/fabric_cli/client/fab_api_catalog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""Catalog API client for searching Fabric items across workspaces.

API Reference: POST https://api.fabric.microsoft.com/v1/catalog/search
Required Scope: Catalog.Read.All
"""

from argparse import Namespace

from fabric_cli.client import fab_api_client as fabric_api
from fabric_cli.client.fab_api_types import ApiResponse


def search(args: Namespace, payload: dict) -> ApiResponse:
"""Search the Fabric catalog for items.

https://learn.microsoft.com/en-us/rest/api/fabric/core/catalog/search
Comment thread
aviatco marked this conversation as resolved.

Args:
args: Namespace with request configuration
payload: Dict with search request body:
- search (required): Text to search across displayName, description, workspaceName
- pageSize: Number of results per page
- continuationToken: Token for pagination
- filter: OData filter string, e.g., "Type eq 'Report' or Type eq 'Lakehouse'"

Returns:
ApiResponse with search results containing:
- value: List of ItemCatalogEntry objects
- continuationToken: Token for next page (if more results exist)

Note:
The following item types are NOT searchable via this API:
Dashboard

Note: Dataflow Gen1 and Gen2 are currently not searchable; only Dataflow Gen2
CI/CD items are returned (as type 'Dataflow').
Scorecards are returned as type 'Report'.
"""
args.uri = "catalog/search"
args.method = "post"
# raw_response=True so we handle pagination ourselves in fab_find
args.raw_response = True
return fabric_api.do_request(args, json=payload)

2 changes: 2 additions & 0 deletions src/fabric_cli/commands/find/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) Microsoft Corporation.
Comment thread
aviatco marked this conversation as resolved.
# Licensed under the MIT License.
Loading