home / content / repos

repos: 346597557

This data as json

id node_id name full_name private owner html_url description fork created_at updated_at pushed_at homepage size stargazers_count watchers_count language has_issues has_projects has_downloads has_wiki has_pages forks_count archived disabled open_issues_count license topics forks open_issues watchers default_branch permissions temp_clone_token organization network_count subscribers_count readme readme_html allow_forking visibility is_template template_repository web_commit_signoff_required has_discussions
346597557 MDEwOlJlcG9zaXRvcnkzNDY1OTc1NTc= tableau-to-sqlite simonw/tableau-to-sqlite 0 9599 https://github.com/simonw/tableau-to-sqlite Fetch data from Tableau into a SQLite database 0 2021-03-11T06:12:02Z 2021-06-10T04:40:44Z 2021-04-29T16:11:03Z   212 8 8 Python 1 1 1 1 0 2 0 0 2 apache-2.0 ["datasette-io", "datasette-tool"] 2 2 8 main {"admin": false, "push": false, "pull": false}     2 1 # tableau-to-sqlite [![PyPI](https://img.shields.io/pypi/v/tableau-to-sqlite.svg)](https://pypi.org/project/tableau-to-sqlite/) [![Changelog](https://img.shields.io/github/v/release/simonw/tableau-to-sqlite?include_prereleases&label=changelog)](https://github.com/simonw/tableau-to-sqlite/releases) [![Tests](https://github.com/simonw/tableau-to-sqlite/workflows/Test/badge.svg)](https://github.com/simonw/tableau-to-sqlite/actions?query=workflow%3ATest) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/tableau-to-sqlite/blob/master/LICENSE) Fetch data from Tableau into a SQLite database. A wrapper around [TableauScraper](https://github.com/bertrandmartel/tableau-scraping/). ## Installation Install this tool using `pip`: $ pip install tableau-to-sqlite ## Usage If you have the URL to a Tableau dashboard like this: https://results.mo.gov/t/COVID19/views/VaccinationsDashboard/Vaccinations You can pass that directly to the tool: tableau-to-sqlite tableau.db \ https://results.mo.gov/t/COVID19/views/VaccinationsDashboard/Vaccinations This will create a SQLite database called `tableau.db` containing one table for each of the worksheets in that dashboard. If the dashboard is hosted on https://public.tableau.com/ you can instead provide the view name. This will be two strings separated by a `/` symbol - something like this: OregonCOVID-19VaccineProviderEnrollment/COVID-19VaccineProviderEnrollment Now run the tool like this: tableau-to-sqlite tableau.db \ OregonCOVID-19VaccineProviderEnrollment/COVID-19VaccineProviderEnrollment ## Get the data as JSON or CSV If you're building a [git scraper](https://simonwillison.net/2020/Oct/9/git-scraping/) you may want to convert the data gathered by this tool to CSV or JSON to check into your repository. You can do that using [sqlite-utils](https://sqlite-utils.datasette.io/). Install it using `pip`: pip install sqlite-utils You can dump out a table as JSON like so: sqlite-utils rows tableau.db \ 'Admin Site and County Map Site No Info' > tableau.json Or as CSV like this: sqlite-utils rows tableau.db --csv \ 'Admin Site and County Map Site No Info' > tableau.csv ## Development To contribute to this tool, first checkout the code. Then create a new virtual environment: cd tableau-to-sqlite python -mvenv venv source venv/bin/activate Or if you are using `pipenv`: pipenv shell Now install the dependencies and tests: pip install -e '.[test]' To run the tests: pytest <div id="readme" class="md" data-path="README.md"><article class="markdown-body entry-content container-lg" itemprop="text"><h1><a id="user-content-tableau-to-sqlite" class="anchor" aria-hidden="true" href="#user-content-tableau-to-sqlite"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>tableau-to-sqlite</h1> <p><a href="https://pypi.org/project/tableau-to-sqlite/" rel="nofollow"><img src="https://camo.githubusercontent.com/bdda6efc6980f655c99f0475b322f27bbc413e7e13e847e55e697dd135d10601/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f7461626c6561752d746f2d73716c6974652e737667" alt="PyPI" data-canonical-src="https://img.shields.io/pypi/v/tableau-to-sqlite.svg" style="max-width:100%;"></a> <a href="https://github.com/simonw/tableau-to-sqlite/releases"><img src="https://camo.githubusercontent.com/fd18da3a8541734c627a9be68134477abe876a8695165916ff7c8c5bbf7269eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f73696d6f6e772f7461626c6561752d746f2d73716c6974653f696e636c7564655f70726572656c6561736573266c6162656c3d6368616e67656c6f67" alt="Changelog" data-canonical-src="https://img.shields.io/github/v/release/simonw/tableau-to-sqlite?include_prereleases&amp;label=changelog" style="max-width:100%;"></a> <a href="https://github.com/simonw/tableau-to-sqlite/actions?query=workflow%3ATest"><img src="https://github.com/simonw/tableau-to-sqlite/workflows/Test/badge.svg" alt="Tests" style="max-width:100%;"></a> <a href="https://github.com/simonw/tableau-to-sqlite/blob/master/LICENSE"><img src="https://camo.githubusercontent.com/1698104e976c681143eb0841f9675c6f802bb7aa832afc0c7a4e719b1f3cf955/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c75652e737667" alt="License" data-canonical-src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" style="max-width:100%;"></a></p> <p>Fetch data from Tableau into a SQLite database. A wrapper around <a href="https://github.com/bertrandmartel/tableau-scraping/">TableauScraper</a>.</p> <h2><a id="user-content-installation" class="anchor" aria-hidden="true" href="#user-content-installation"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Installation</h2> <p>Install this tool using <code>pip</code>:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="$ pip install tableau-to-sqlite "><pre><code>$ pip install tableau-to-sqlite </code></pre></div> <h2><a id="user-content-usage" class="anchor" aria-hidden="true" href="#user-content-usage"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Usage</h2> <p>If you have the URL to a Tableau dashboard like this:</p> <p><a href="https://results.mo.gov/t/COVID19/views/VaccinationsDashboard/Vaccinations" rel="nofollow">https://results.mo.gov/t/COVID19/views/VaccinationsDashboard/Vaccinations</a></p> <p>You can pass that directly to the tool:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="tableau-to-sqlite tableau.db \ https://results.mo.gov/t/COVID19/views/VaccinationsDashboard/Vaccinations "><pre><code>tableau-to-sqlite tableau.db \ https://results.mo.gov/t/COVID19/views/VaccinationsDashboard/Vaccinations </code></pre></div> <p>This will create a SQLite database called <code>tableau.db</code> containing one table for each of the worksheets in that dashboard.</p> <p>If the dashboard is hosted on <a href="https://public.tableau.com/" rel="nofollow">https://public.tableau.com/</a> you can instead provide the view name. This will be two strings separated by a <code>/</code> symbol - something like this:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="OregonCOVID-19VaccineProviderEnrollment/COVID-19VaccineProviderEnrollment "><pre><code>OregonCOVID-19VaccineProviderEnrollment/COVID-19VaccineProviderEnrollment </code></pre></div> <p>Now run the tool like this:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="tableau-to-sqlite tableau.db \ OregonCOVID-19VaccineProviderEnrollment/COVID-19VaccineProviderEnrollment "><pre><code>tableau-to-sqlite tableau.db \ OregonCOVID-19VaccineProviderEnrollment/COVID-19VaccineProviderEnrollment </code></pre></div> <h2><a id="user-content-get-the-data-as-json-or-csv" class="anchor" aria-hidden="true" href="#user-content-get-the-data-as-json-or-csv"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Get the data as JSON or CSV</h2> <p>If you're building a <a href="https://simonwillison.net/2020/Oct/9/git-scraping/" rel="nofollow">git scraper</a> you may want to convert the data gathered by this tool to CSV or JSON to check into your repository.</p> <p>You can do that using <a href="https://sqlite-utils.datasette.io/" rel="nofollow">sqlite-utils</a>. Install it using <code>pip</code>:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="pip install sqlite-utils "><pre><code>pip install sqlite-utils </code></pre></div> <p>You can dump out a table as JSON like so:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="sqlite-utils rows tableau.db \ 'Admin Site and County Map Site No Info' &gt; tableau.json "><pre><code>sqlite-utils rows tableau.db \ 'Admin Site and County Map Site No Info' &gt; tableau.json </code></pre></div> <p>Or as CSV like this:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="sqlite-utils rows tableau.db --csv \ 'Admin Site and County Map Site No Info' &gt; tableau.csv "><pre><code>sqlite-utils rows tableau.db --csv \ 'Admin Site and County Map Site No Info' &gt; tableau.csv </code></pre></div> <h2><a id="user-content-development" class="anchor" aria-hidden="true" href="#user-content-development"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Development</h2> <p>To contribute to this tool, first checkout the code. Then create a new virtual environment:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="cd tableau-to-sqlite python -mvenv venv source venv/bin/activate "><pre><code>cd tableau-to-sqlite python -mvenv venv source venv/bin/activate </code></pre></div> <p>Or if you are using <code>pipenv</code>:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="pipenv shell "><pre><code>pipenv shell </code></pre></div> <p>Now install the dependencies and tests:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="pip install -e '.[test]' "><pre><code>pip install -e '.[test]' </code></pre></div> <p>To run the tests:</p> <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="pytest "><pre><code>pytest </code></pre></div> </article></div>            

Links from other tables

  • 4 rows from repo in releases
Powered by Datasette · Queries took 1.237ms