forked from databrickslabs/sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
26 lines (21 loc) · 817 Bytes
/
Copy path__init__.py
File metadata and controls
26 lines (21 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from pathlib import Path
import yaml
from databricks.labs.blueprint.tui import Prompts
from databricks.sdk import WorkspaceClient
from sql_migration_assistant.utils.initialsetup import SetUpMigrationAssistant
def hello(**kwargs):
w = WorkspaceClient(
product="sql_migration_assistant",
product_version="0.0.1",
profile=kwargs.get("profile"),
)
p = Prompts()
setter_upper = SetUpMigrationAssistant()
setter_upper.check_cloud(w)
final_config = setter_upper.setup_migration_assistant(w, p)
current_path = Path(__file__).parent.resolve()
local_config = str(current_path) + "/config.yml"
with open(local_config, "w") as f:
yaml.dump(final_config, f)
setter_upper.upload_files(w, current_path)
setter_upper.launch_review_app(w, final_config)