Created
January 29, 2025 20:53
-
-
Save gshotwell/31f7edd3b1d053818cb73df2a79f09f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: A dbt model | |
--- | |
```{python} | |
#| echo: false | |
sql_path = "my_path.sql" | |
``` | |
## Columns | |
```{python} | |
# | echo: false | |
import os | |
os.chdir("..") | |
from reactable import Reactable, embed_css | |
from helpers import read_dbt_column_docs | |
embed_css() | |
Reactable( | |
read_dbt_column_docs(sql_path), | |
default_page_size=20, | |
searchable=True, | |
filterable=True, | |
) | |
``` | |
## SQL code | |
```{python} | |
# | output: asis | |
# | echo: false | |
from helpers import read_sql | |
read_sql(sql_path) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In an ideal world I would have something like:
document_model("sql_path)
which I could call in other documents.