Skip to content
Merged
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
45 changes: 25 additions & 20 deletions dlt/cli/pipeline_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,30 +113,35 @@ def _display_pending_packages() -> Tuple[Sequence[str], Sequence[str]]:
fmt.echo("Found pipeline %s in %s" % (fmt.bold(p.pipeline_name), fmt.bold(p.pipelines_dir)))

if operation == "show":
from dlt.common.runtime import signals
from dlt.helpers.streamlit_app import index
if command_kwargs.get("marimo"):
from dlt.helpers.studio.runner import run_studio

with signals.delayed_signals():
streamlit_cmd = [
"streamlit",
"run",
index.__file__,
"--client.showSidebarNavigation",
"false",
]
run_studio()
else:
from dlt.common.runtime import signals
from dlt.helpers.streamlit_app import index

with signals.delayed_signals():
streamlit_cmd = [
"streamlit",
"run",
index.__file__,
"--client.showSidebarNavigation",
"false",
]

if hot_reload:
streamlit_cmd.append("--server.runOnSave")
streamlit_cmd.append("true")
if hot_reload:
streamlit_cmd.append("--server.runOnSave")
streamlit_cmd.append("true")

streamlit_cmd.append("--")
streamlit_cmd.append(pipeline_name)
streamlit_cmd.append("--pipelines-dir")
streamlit_cmd.append(p.pipelines_dir)
streamlit_cmd.append("--")
streamlit_cmd.append(pipeline_name)
streamlit_cmd.append("--pipelines-dir")
streamlit_cmd.append(p.pipelines_dir)

venv = Venv.restore_current()
for line in iter_stdout(venv, *streamlit_cmd):
fmt.echo(line)
venv = Venv.restore_current()
for line in iter_stdout(venv, *streamlit_cmd):
fmt.echo(line)

if operation == "info":
state: TSourceState = p.state # type: ignore
Expand Down
10 changes: 8 additions & 2 deletions dlt/cli/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def configure_parser(self, pipe_cmd: argparse.ArgumentParser) -> None:
pipeline state set by the resources during the extraction process.
""",
)
pipeline_subparsers.add_parser(
show_cmd = pipeline_subparsers.add_parser(
"show",
help=(
"Generates and launches Streamlit app with the loading status and dataset explorer"
Expand All @@ -212,9 +212,15 @@ def configure_parser(self, pipe_cmd: argparse.ArgumentParser) -> None:

This is a simple app that you can use to inspect the schemas and data in the destination as well as your pipeline state and loading status/stats. It should be executed from the same folder from which you ran the pipeline script to access destination credentials.

Requires `streamlit` to be installed in the current environment: `pip install streamlit`.
Requires `streamlit` to be installed in the current environment: `pip install streamlit`. Using --marimo flag to launch marimo app preview instead of streamlit.
""",
)
show_cmd.add_argument(
"--marimo",
default=False,
action="store_true",
help="Launch marimo app preview instead of streamlit",
)
pipeline_subparsers.add_parser(
"failed-jobs",
help=(
Expand Down
5 changes: 3 additions & 2 deletions docs/website/docs/reference/command-line-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Generates and launches Streamlit app with the loading status and dataset explore

**Usage**
```sh
dlt pipeline [pipeline_name] show [-h]
dlt pipeline [pipeline_name] show [-h] [--marimo]
```

**Description**
Expand All @@ -196,7 +196,7 @@ Generates and launches Streamlit (https://streamlit.io/) app with the loading st

This is a simple app that you can use to inspect the schemas and data in the destination as well as your pipeline state and loading status/stats. It should be executed from the same folder from which you ran the pipeline script to access destination credentials.

Requires `streamlit` to be installed in the current environment: `pip install streamlit`.
Requires `streamlit` to be installed in the current environment: `pip install streamlit`. Using --marimo flag to launch marimo app preview instead of streamlit.

<details>

Expand All @@ -206,6 +206,7 @@ Inherits arguments from [`dlt pipeline`](#dlt-pipeline).

**Options**
* `-h, --help` - Show this help message and exit
* `--marimo` - Launch marimo app preview instead of streamlit

</details>

Expand Down
Loading