diff --git a/docs/website/docs/getting-started-snippets.py b/docs/website/docs/getting-started-snippets.py index 3c71e27e6c..f66e5a8a34 100644 --- a/docs/website/docs/getting-started-snippets.py +++ b/docs/website/docs/getting-started-snippets.py @@ -121,7 +121,10 @@ def db_snippet() -> None: ) # here we convert the rows into dictionaries on the fly with a map function - load_info = pipeline.run(map(dict, rows), table_name="genome") + load_info = pipeline.run( + map(lambda row: dict(row._mapping), rows), + table_name="genome" + ) print(load_info) # @@@DLT_SNIPPET_END db diff --git a/docs/website/docs/getting-started.md b/docs/website/docs/getting-started.md index 9852a37624..c027cf134d 100644 --- a/docs/website/docs/getting-started.md +++ b/docs/website/docs/getting-started.md @@ -231,12 +231,19 @@ with engine.connect() as conn: ) # here we convert the rows into dictionaries on the fly with a map function - load_info = pipeline.run(map(dict, rows), table_name="genome") + load_info = pipeline.run( + map(lambda row: dict(row._mapping), rows), + table_name="genome" + ) print(load_info) ``` +Install **pymysql** driver: +```sh +pip install pymysql +``` Have some fun and run this snippet [with progress bar enabled](walkthroughs/run-a-pipeline.md#2-see-the-progress-during-loading) (we like **enlighten** the best, **tqdm** works as well): ```bash diff --git a/docs/website/requirements.txt b/docs/website/requirements.txt index 5c14700f58..5ae2155875 100644 --- a/docs/website/requirements.txt +++ b/docs/website/requirements.txt @@ -1 +1,2 @@ pydoc-markdown==4.8.2 +typing-extensions==4.6.3