Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions src/databricks/labs/ucx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class WorkspaceConfig: # pylint: disable=too-many-instance-attributes

# Whether the assessment should capture a specific list of databases, if not specified, it will list all databases.
include_databases: list[str] | None = None
# Whether the assessment should capture databases matching specific prefixes, if not specified, it will list all databases.
include_database_prefixes: list[str] | None = None

# Whether the tables in mounts crawler should crawl a specific list of mounts.
# If not specified, it will list all mounts.
Expand Down
12 changes: 12 additions & 0 deletions src/databricks/labs/ucx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def _prompt_for_new_installation(self) -> WorkspaceConfig:
configure_groups = ConfigureGroups(self.prompts)
configure_groups.run()
include_databases = self._select_databases()
include_database_prefixes = self._select_database_prefixes()

skip_tacl_migration = self.prompts.confirm("Do you want to skip TACL migration when migrating tables?")

Expand Down Expand Up @@ -272,6 +273,7 @@ def _prompt_for_new_installation(self) -> WorkspaceConfig:
log_level=log_level,
num_threads=num_threads,
include_databases=include_databases,
include_database_prefixes=include_database_prefixes,
trigger_job=trigger_job,
recon_tolerance_percent=recon_tolerance_percent,
upload_dependencies=upload_dependencies,
Expand Down Expand Up @@ -428,6 +430,16 @@ def _select_databases(self):
return [x.strip() for x in selected_databases.split(",")]
return None

def _select_database_prefixes(self):
selected_prefixes = self.prompts.question(
"Comma-separated list of database prefixes to include (e.g., 'dev_', 'test_'). "
"If not specified, prefix filtering will not be applied",
default="<NONE>",
)
if selected_prefixes != "<NONE>":
return [x.strip() for x in selected_prefixes.split(",")]
return None

def configure_warehouse(self) -> str:
def warehouse_type(_):
return _.warehouse_type.value if not _.enable_serverless_compute else "SERVERLESS"
Expand Down