refactor complete
This commit is contained in:
@@ -145,19 +145,7 @@ class DebugPlugin(PluginBase):
|
||||
if not env_config:
|
||||
raise ValueError(f"Environment '{name}' not found.")
|
||||
|
||||
# Map Environment model to SupersetConfig
|
||||
from superset_tool.models import SupersetConfig
|
||||
superset_config = SupersetConfig(
|
||||
env=env_config.name,
|
||||
base_url=env_config.url,
|
||||
auth={
|
||||
"provider": "db", # Defaulting to db provider
|
||||
"username": env_config.username,
|
||||
"password": env_config.password,
|
||||
"refresh": "false"
|
||||
}
|
||||
)
|
||||
client = SupersetClient(superset_config)
|
||||
client = SupersetClient(env_config)
|
||||
client.authenticate()
|
||||
count, dbs = client.get_databases()
|
||||
results[name] = {
|
||||
@@ -188,19 +176,7 @@ class DebugPlugin(PluginBase):
|
||||
if not env_config:
|
||||
raise ValueError(f"Environment '{env_name}' not found.")
|
||||
|
||||
# Map Environment model to SupersetConfig
|
||||
from superset_tool.models import SupersetConfig
|
||||
superset_config = SupersetConfig(
|
||||
env=env_config.name,
|
||||
base_url=env_config.url,
|
||||
auth={
|
||||
"provider": "db", # Defaulting to db provider
|
||||
"username": env_config.username,
|
||||
"password": env_config.password,
|
||||
"refresh": "false"
|
||||
}
|
||||
)
|
||||
client = SupersetClient(superset_config)
|
||||
client = SupersetClient(env_config)
|
||||
client.authenticate()
|
||||
|
||||
dataset_response = client.get_dataset(dataset_id)
|
||||
|
||||
Reference in New Issue
Block a user