fabric-cli

domain examples

Type: .Domain

Supported commands: fab desc .Domain

Navigate to a domain using cd command. Domains are included in .domains. You can use relative and absolute paths based on current context.

# use absolute path
fab:/ws1.Workspace$ cd /.domains
* Switched to '.domains'

# use relative path
fab:/ws1.Workspace$ cd ../.domains/domain1.Domain
* Switched to 'domain1.Domain'

Checking if a domain exists

Verify if a domain exists. Using exists on .domains has no effect.

fab:/$ exists .domains/domain1.Domain
* true

fab:/$ exists .domains/domain1_.Domain
* false

Getting and querying domain details

Retrieve and query domain details with -q (JMESPath query). Output the result to a local path or Lakehouse/Files with -o.

# get JSON properties
fab:/$ get .domains/domain1.Domain

# query using JMESPath
fab:/$ get .domains/domain1.Domain -q . -o /tmp

Listing domains

List existing domains and their details using -l.

fab:/$ ls .domains
fab:/$ ls .domains -l

Creating a domain

Create a domain. Use optional parameters with -P as needed. Note that a domain can only have a parent if that parent domain has no parent itself.

# using default configs
fab:/$ create .domains/domain1.Domain

# specify parent and description
fab:/$ create .domains/domain2.Domain -P parentdomainname=domain1,description=domain 2

# specify parent
fab:/$ create .domains/domain3.Domain -P parentDomainName=domain1.Domain

Removing a domain

Remove a domain. Use -f to force.

fab:/$ rm .domains/domain2.Domain
fab:/$ rm .domains/domain3.Domain -f

Setting and updating domain properties

Set domain properties. Use -f to force. Properties are case sensitive.

# rename domain
fab:/$ set .domains/dom1.domain -q displayName -i dom1ren
! Requires Fabric admin role to update
! Modifying properties may lead to unintended consequences
? Are you sure? Yes
! Requires Fabric admin role to view
Setting new property for 'dom1.Domain'...
* Domain updated

# set description
fab:/$ set .domains/dom1ren.Domain -q description -i "custom description" -f

# change contributorsScope (AdminsOnly, AllTenant, SpecificUsersAndGroups)
fab:/$ set .domains/dom1ren.Domain -q contributorsScope -i "AdminsOnly"

Assigning a domain to a workspace

Assign a domain to a workspace with -W. Use -f to force.

fab:/$ assign .domains/domain1.Domain -W ws1.Workspace -f

Unassigning a domain from a workspace

Unassign a domain from a workspace with -W. Use -f to force.

fab:/$ unassign .domains/domain1.Domain -W ws1.Workspace -f

See all examples