Skip to content

Commit

Permalink
profile
Browse files Browse the repository at this point in the history
  • Loading branch information
neelasha23 committed Jan 25, 2024
1 parent 0d021ed commit 47ba202
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/user-guide/data-profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,23 @@ Let's profile `my_numbers` of `b_schema`
```{code-cell} ipython3
%sqlcmd profile --table trips --schema some_schema
```

### Parametrizing arguments

JupySQL supports variable expansion of arguments in the form of `{{variable}}`. Let's see and example using `table`, `schema` and `output`.

```{code-cell} ipython3
table = "trips"
schema = "some_schema"
output = "my-report.html"
```

```{code-cell} ipython3
%sqlcmd profile --table {{table}} --schema {{schema}} --output {{output}}
```

```{code-cell} ipython3
from IPython.display import HTML
HTML("my-report.html")
```
21 changes: 21 additions & 0 deletions doc/user-guide/tables-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ Pass `--schema/-s` to get tables in a different schema:

+++

JupySQL also supports variable expansion of arguments in the form of `{{variable}}`. Let's see an example:

```{code-cell} ipython3
schema = "schema"
```

```{code-cell} ipython3
%sqlcmd tables --schema {{schema}}
```

## List columns

Use `%sqlcmd columns --table/-t` to get the columns for the given table.
Expand Down Expand Up @@ -104,3 +114,14 @@ Get the columns for the table in the newly created schema:
```{code-cell} ipython3
%sqlcmd columns --table numbers --schema some_schema
```

JupySQL supports variable expansion of arguments in the form of `{{variable}}`. Let's see an example of parametrizing `table` and `schema`:

```{code-cell} ipython3
table = "numbers"
schema = "some_schema"
```

```{code-cell} ipython3
%sqlcmd columns --table {{table}} --schema {{schema}}
```

0 comments on commit 47ba202

Please sign in to comment.