docs(new docs site): removes old sphinx doc site with gatsby (#10784)
* Remove old apache sphinx doc site with refreshed gatsby * remove rando * add licenses * excluing .mdx files from license checks * fixes * Clean up sphinx references * Addressed comments * colors and tweaks * more fixes * add dummy docs/requirements.txt to satisfy stupid fossa * cp .prettierrc * more licenses * minor touchups * reqs * removing old videos * add github buttons * prettier * tweaks * Eugenia/Fix some of the images and modified some of database pages * add subheadernav * add side headers nav and more responsive design for docs * update resources page and other styling updates * linting * tweaks * removing windows and align:center * update resources * remove links and and card hearder * lots of styling tweaks * Tweaks and minor improvements * lint * fix CI * trigger pre-comimt * rererefix CI Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com> Co-authored-by: Eugenia Moreno <eugenia@Eugenias-MBP.fios-router.home> Co-authored-by: Evan Rusackas <evan@preset.io>
|
@ -32,8 +32,6 @@ analyze:
|
|||
type: pip
|
||||
target: docs
|
||||
path: docs
|
||||
options:
|
||||
requirements: ./requirements/documentation.txt
|
||||
- name: .
|
||||
type: pip
|
||||
target: .
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
# Python linting and docs
|
||||
name: Docs
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.1.1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
uses: apache-superset/cached-dependencies@b90713b
|
||||
with:
|
||||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install -r requirements/testing.txt
|
||||
pip install -r requirements/documentation.txt
|
||||
|
||||
- name: pylint
|
||||
# `-j 0` run Pylint in parallel
|
||||
run: pylint -j 0 superset
|
||||
|
||||
- name: pre-commit
|
||||
run: pre-commit run --all-files
|
||||
|
||||
- name: Build documentation
|
||||
run: sphinx-build -b html docs _build/html -W
|
|
@ -25,3 +25,19 @@ jobs:
|
|||
working-directory: ./superset-frontend
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF javascript
|
||||
|
||||
docs:
|
||||
name: build
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
- name: npm install
|
||||
working-directory: ./superset-frontend
|
||||
run: |
|
||||
npm install
|
||||
- name: gatsby build
|
||||
working-directory: ./superset-frontend
|
||||
run: |
|
||||
npm run build
|
||||
|
|
|
@ -4,6 +4,190 @@ name: Python
|
|||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.1.1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
uses: apache-superset/cached-dependencies@b90713b
|
||||
with:
|
||||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install -r requirements/testing.txt
|
||||
- name: pylint
|
||||
# `-j 0` run Pylint in parallel
|
||||
run: pylint -j 0 superset
|
||||
|
||||
pre-commit:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.1.1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
uses: apache-superset/cached-dependencies@b90713b
|
||||
with:
|
||||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install -r requirements/integration.txt
|
||||
- name: pre-commit
|
||||
run: pre-commit run --all-files
|
||||
|
||||
babel-extract:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.1.1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
uses: apache-superset/cached-dependencies@b90713b
|
||||
with:
|
||||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install -r requirements/base.txt
|
||||
- name: Test babel extraction
|
||||
run: flask fab babel-extract --target superset/translations --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _,__,t,tn,tct
|
||||
|
||||
test-postgres-presto:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
# run unit tests in multiple version just for fun
|
||||
python-version: [3.8]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.superset_test_config
|
||||
REDIS_PORT: 16379
|
||||
SUPERSET__SQLALCHEMY_DATABASE_URI:
|
||||
postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
|
||||
SUPERSET__SQLALCHEMY_EXAMPLES_URI:
|
||||
presto://localhost:15433/memory/default
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
POSTGRES_USER: superset
|
||||
POSTGRES_PASSWORD: superset
|
||||
ports:
|
||||
# Use custom ports for services to avoid accidentally connecting to
|
||||
# GitHub action runner's default installations
|
||||
- 15432:5432
|
||||
presto:
|
||||
image: prestosql/presto:339
|
||||
env:
|
||||
POSTGRES_USER: superset
|
||||
POSTGRES_PASSWORD: superset
|
||||
ports:
|
||||
# Use custom ports for services to avoid accidentally connecting to
|
||||
# GitHub action runner's default installations
|
||||
- 15433:8080
|
||||
redis:
|
||||
image: redis:5-alpine
|
||||
ports:
|
||||
- 16379:6379
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.1.1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
uses: apache-superset/cached-dependencies@b90713b
|
||||
with:
|
||||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install -r requirements/testing.txt
|
||||
setup-postgres
|
||||
- name: Run celery
|
||||
run: celery worker --app=superset.tasks.celery_app:app -Ofair -c 2 &
|
||||
- name: Python unit tests (PostgreSQL)
|
||||
run: |
|
||||
./scripts/python_tests.sh
|
||||
- name: Upload code coverage
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF python
|
||||
|
||||
test-postgres-hive:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
# run unit tests in multiple version just for fun
|
||||
python-version: [3.7, 3.8]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.superset_test_config
|
||||
REDIS_PORT: 16379
|
||||
SUPERSET__SQLALCHEMY_DATABASE_URI:
|
||||
postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
|
||||
SUPERSET__SQLALCHEMY_EXAMPLES_URI: hive://localhost:10000/default
|
||||
UPLOAD_FOLDER: /tmp/.superset/uploads/
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
POSTGRES_USER: superset
|
||||
POSTGRES_PASSWORD: superset
|
||||
ports:
|
||||
# Use custom ports for services to avoid accidentally connecting to
|
||||
# GitHub action runner's default installations
|
||||
- 15432:5432
|
||||
redis:
|
||||
image: redis:5-alpine
|
||||
ports:
|
||||
- 16379:6379
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Create csv upload directory
|
||||
run: sudo mkdir -p /tmp/.superset/uploads
|
||||
- name: Give write access to the csv upload directory
|
||||
run: sudo chown -R $USER:$USER /tmp/.superset
|
||||
- name: Start hadoop and hive
|
||||
run: docker-compose -f scripts/databases/hive/docker-compose.yml up -d
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2.1.1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
uses: apache-superset/cached-dependencies@b90713b
|
||||
with:
|
||||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install -r requirements/testing.txt
|
||||
setup-postgres
|
||||
- name: Run celery
|
||||
run: celery worker --app=superset.tasks.celery_app:app -Ofair -c 2 &
|
||||
- name: Python unit tests (PostgreSQL)
|
||||
run: |
|
||||
./scripts/python_tests.sh
|
||||
- name: Upload code coverage
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF python
|
||||
|
||||
test-postgres:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
|
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install -r requirements/documentation.txt
|
||||
pip install -r requirements/base.txt
|
||||
- name: Test babel extraction
|
||||
run: |
|
||||
flask fab babel-extract --target superset/translations \
|
||||
|
|
|
@ -46,3 +46,4 @@ requirements/*
|
|||
vendor/*
|
||||
# github configuration
|
||||
.github/*
|
||||
.*mdx
|
||||
|
|
|
@ -205,7 +205,7 @@ Finally, never submit a PR that will put master branch in broken state. If the P
|
|||
- For Python, include it in `setup.py` denoting any specific restrictions and in `requirements.txt` pinned to a specific version which ensures that the application build is deterministic.
|
||||
- For TypeScript/JavaScript, include new libraries in `package.json`
|
||||
- **Tests:** The pull request should include tests, either as doctests, unit tests, or both. Make sure to resolve all errors and test failures. See [Testing](#testing) for how to run tests.
|
||||
- **Documentation:** If the pull request adds functionality, the docs should be updated as part of the same PR. Doc string are often sufficient, make sure to follow the sphinx compatible standards.
|
||||
- **Documentation:** If the pull request adds functionality, the docs should be updated as part of the same PR.
|
||||
- **CI:** Reviewers will not review the code until all CI tests are passed. Sometimes there can be flaky tests. You can close and open PR to re-run CI test. Please report if the issue persists. After the CI fix has been deployed to `master`, please rebase your PR.
|
||||
- **Code coverage:** Please ensure that code coverage does not decrease.
|
||||
- Remove `[WIP]` when ready for review. Please note that it may be merged soon after approved so please make sure the PR is ready to merge and do not expect more time for post-approval edits.
|
||||
|
@ -299,68 +299,10 @@ cd incubator-superset
|
|||
|
||||
### Documentation
|
||||
|
||||
The latest documentation and tutorial are available at https://superset.incubator.apache.org/.
|
||||
The latest documentation and tutorial are available at https://superset.apache.org/.
|
||||
|
||||
Contributing to the official documentation is relatively easy, once you've setup
|
||||
your environment and done an edit end-to-end. The docs can be found in the
|
||||
`docs/` subdirectory of the repository, and are written in the
|
||||
[reStructuredText format](https://en.wikipedia.org/wiki/ReStructuredText) (.rst).
|
||||
If you've written Markdown before, you'll find the reStructuredText format familiar.
|
||||
|
||||
Superset uses [Sphinx](http://www.sphinx-doc.org/en/1.5.1/) to convert the rst files
|
||||
in `docs/` to the final HTML output users see.
|
||||
|
||||
Finally, to make changes to the rst files and build the docs using Sphinx,
|
||||
you'll need to install a handful of dependencies from the repo you cloned:
|
||||
|
||||
```bash
|
||||
pip install -r requirements/documentation.txt
|
||||
```
|
||||
|
||||
To get the feel for how to edit and build the docs, let's edit a file, build
|
||||
the docs and see our changes in action. First, you'll want to
|
||||
[create a new branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)
|
||||
to work on your changes:
|
||||
|
||||
```bash
|
||||
git checkout -b changes-to-docs
|
||||
```
|
||||
|
||||
Now, go ahead and edit one of the files under `docs/`, say `docs/tutorial.rst` - change
|
||||
it however you want. Check out the
|
||||
[ReStructuredText Primer](http://docutils.sourceforge.net/docs/user/rst/quickstart.html)
|
||||
for a reference on the formatting of the rst files.
|
||||
|
||||
Once you've made your changes, run this command to convert the docs into HTML:
|
||||
|
||||
```bash
|
||||
make html
|
||||
```
|
||||
|
||||
You'll see a lot of output as Sphinx handles the conversion. After it's done, the
|
||||
HTML Sphinx generated should be in `docs/_build/html`. Navigate there
|
||||
and start a simple web server so we can check out the docs in a browser:
|
||||
|
||||
```bash
|
||||
cd docs/_build/html
|
||||
python -m http.server # Python2 users should use SimpleHTTPServer
|
||||
|
||||
```
|
||||
|
||||
This will start a small Python web server listening on port 8000. Point your
|
||||
browser to http://localhost:8000, find the file
|
||||
you edited earlier, and check out your changes!
|
||||
|
||||
If you've made a change you'd like to contribute to the actual docs, just commit
|
||||
your code, push your new branch to Github:
|
||||
|
||||
```bash
|
||||
git add docs/tutorial.rst
|
||||
git commit -m 'Awesome new change to tutorial'
|
||||
git push origin changes-to-docs
|
||||
```
|
||||
|
||||
Then, [open a pull request](https://help.github.com/articles/about-pull-requests/).
|
||||
The site is written using the Gatsby framework and docz for the
|
||||
documentation subsection. Find out more about it in `docs/README.md`
|
||||
|
||||
#### Images
|
||||
|
||||
|
@ -377,15 +319,6 @@ in the docs.
|
|||
|
||||
For example, the image referenced above actually lives in `superset-frontend/images/tutorial`. Since the image is moved during the documentation build process, the docs reference the image in `_static/images/tutorial` instead.
|
||||
|
||||
#### API documentation
|
||||
|
||||
Generate the API documentation with:
|
||||
|
||||
```bash
|
||||
pip install -r requirements/documentation.txt
|
||||
python setup.py build_sphinx
|
||||
```
|
||||
|
||||
### Flask server
|
||||
|
||||
#### OS Dependencies
|
||||
|
@ -604,7 +537,7 @@ or similar as the later will cause typing issues. The former is of type `List[Ca
|
|||
|
||||
To ensure clarity, consistency, all readability, _all_ new functions should use
|
||||
[type hints](https://docs.python.org/3/library/typing.html) and include a
|
||||
docstring using Sphinx documentation.
|
||||
docstring.
|
||||
|
||||
Note per [PEP-484](https://www.python.org/dev/peps/pep-0484/#exceptions) no
|
||||
syntax for listing explicitly raised exceptions is proposed and thus the
|
||||
|
|
|
@ -20,7 +20,7 @@ ARG VERSION
|
|||
RUN git clone --depth 1 --branch ${VERSION} https://github.com/apache/incubator-superset.git /superset
|
||||
WORKDIR /superset
|
||||
# install doc dependencies
|
||||
RUN pip install -r requirements/documentation.txt
|
||||
RUN pip install -r requirements/base.txt
|
||||
# build the docs
|
||||
RUN python setup.py build_sphinx
|
||||
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
module.exports = {
|
||||
parser: 'babel-eslint',
|
||||
rules: {
|
||||
strict: 0,
|
||||
'react/jsx-filename-extension': [
|
||||
2,
|
||||
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
|
||||
],
|
||||
'import/extensions': 'off',
|
||||
'react/jsx-props-no-spreading': 'off',
|
||||
'jsx-a11y/click-events-have-key-events': 'off',
|
||||
'jsx-a11y/iframe-has-title': 'off',
|
||||
'jsx-a11y/interactive-supports-focus': 'off',
|
||||
'react-hooks/rules-of-hooks': 'off',
|
||||
},
|
||||
extends: ['airbnb', 'airbnb/hooks'],
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
jasmine: true,
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
node: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
.docz
|
||||
.cache
|
||||
public
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"arrowParens": "avoid"
|
||||
}
|
208
docs/Makefile
|
@ -1,208 +0,0 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " applehelp to make an Apple Help Book"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " xml to make Docutils-native XML files"
|
||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
@echo " coverage to run coverage check of the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/superset.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/superset.qhc"
|
||||
|
||||
applehelp:
|
||||
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
||||
@echo
|
||||
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
|
||||
@echo "N.B. You won't be able to view it unless you put it in" \
|
||||
"~/Library/Documentation/Help or install it in your application" \
|
||||
"bundle."
|
||||
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/superset"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/superset"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
latexpdfja:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
coverage:
|
||||
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
|
||||
@echo "Testing of coverage in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/coverage/python.txt."
|
||||
|
||||
xml:
|
||||
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||
@echo
|
||||
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||
|
||||
pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
|
@ -0,0 +1,33 @@
|
|||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
Here's the source to the documentation hosted at
|
||||
<a href="https://superset.apache.org">superset.apache.org</a>
|
||||
|
||||
The site runs on the Gatsby framework and uses docz for it's
|
||||
`Documentation` subsection.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
```bash
|
||||
cd docs/
|
||||
npm install
|
||||
npm run start
|
||||
# navigate to localhost:8000`
|
||||
```
|
|
@ -1,77 +0,0 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
div.navbar {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#tutorial img {
|
||||
border: 1px solid gray;
|
||||
box-shadow: 5px 5px 5px #888888;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#gallery img {
|
||||
border: 1px solid gray;
|
||||
box-shadow: 5px 5px 5px #888888;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.carousel img {
|
||||
max-height: 500px;
|
||||
}
|
||||
.carousel {
|
||||
overflow: hidden;
|
||||
height: 500px;
|
||||
}
|
||||
.carousel-caption h1 {
|
||||
font-size: 80px;
|
||||
}
|
||||
.carousel-caption p {
|
||||
font-size: 20px;
|
||||
}
|
||||
div.carousel-caption{
|
||||
background: rgba(0,0,0,0.5);
|
||||
border-radius: 20px;
|
||||
top: 150px;
|
||||
bottom: auto !important;
|
||||
}
|
||||
.carousel-inner > .item > img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
{
|
||||
margin: -20px;
|
||||
}
|
||||
.carousel-indicators li {
|
||||
background-color: #AAA;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.carousel-indicators .active {
|
||||
background-color: #000;
|
||||
border: 5px solid black;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
../../superset-frontend/images
|
|
@ -1,325 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Creating your first dashboard
|
||||
=============================
|
||||
|
||||
This tutorial targets someone who wants to create charts and dashboards
|
||||
in Superset. We'll show you how to connect Superset
|
||||
to a new database and configure a table in that database for analysis. You'll
|
||||
also explore the data you've exposed and add a visualization to a dashboard
|
||||
so that you get a feel for the end-to-end user experience.
|
||||
|
||||
Connecting to a new database
|
||||
----------------------------
|
||||
|
||||
We assume you already have a database configured and can connect to it from the
|
||||
instance on which you’re running Superset. If you’re just testing Superset and
|
||||
want to explore sample data, you can load some
|
||||
`sample PostgreSQL datasets <https://wiki.postgresql.org/wiki/Sample_Databases>`_
|
||||
into a fresh DB, or configure the
|
||||
`example weather data <https://github.com/dylburger/noaa-ghcn-weather-data>`_
|
||||
we use here.
|
||||
|
||||
Under the **Sources** menu, select the *Databases* option:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_01_sources_database.png
|
||||
:scale: 70%
|
||||
|
||||
On the resulting page, click on the green plus sign, near the top right:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_02_add_database.png
|
||||
:scale: 70%
|
||||
|
||||
You can configure a number of advanced options on this page, but for
|
||||
this walkthrough, you’ll only need to do **two things**:
|
||||
|
||||
1. Name your database connection:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_03_database_name.png
|
||||
:scale: 70%
|
||||
|
||||
2. Provide the SQLAlchemy Connection URI and test the connection:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_04_sqlalchemy_connection_string.png
|
||||
:scale: 70%
|
||||
|
||||
This example shows the connection string for our test weather database.
|
||||
As noted in the text below the URI, you should refer to the SQLAlchemy
|
||||
documentation on
|
||||
`creating new connection URIs <https://docs.sqlalchemy.org/en/rel_1_2/core/engines.html#database-urls>`_
|
||||
for your target database.
|
||||
|
||||
Click the **Test Connection** button to confirm things work end to end.
|
||||
Once Superset can successfully connect and authenticate, you should see
|
||||
a popup like this:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_05_connection_popup.png
|
||||
:scale: 50%
|
||||
|
||||
Moreover, you should also see the list of tables Superset can read from
|
||||
the schema you’re connected to, at the bottom of the page:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_06_list_of_tables.png
|
||||
:scale: 70%
|
||||
|
||||
If the connection looks good, save the configuration by clicking the **Save**
|
||||
button at the bottom of the page:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_07_save_button.png
|
||||
:scale: 70%
|
||||
|
||||
Adding a new table
|
||||
------------------
|
||||
|
||||
Now that you’ve configured a database, you’ll need to add specific tables
|
||||
to Superset that you’d like to query.
|
||||
|
||||
Under the **Sources** menu, select the *Tables* option:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_08_sources_tables.png
|
||||
:scale: 70%
|
||||
|
||||
On the resulting page, click on the green plus sign, near the top left:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_09_add_new_table.png
|
||||
:scale: 70%
|
||||
|
||||
You only need a few pieces of information to add a new table to Superset:
|
||||
|
||||
* The name of the table
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_10_table_name.png
|
||||
:scale: 70%
|
||||
|
||||
* The target database from the **Database** drop-down menu (i.e. the one
|
||||
you just added above)
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_11_choose_db.png
|
||||
:scale: 70%
|
||||
|
||||
* Optionally, the database schema. If the table exists in the “default” schema
|
||||
(e.g. the *public* schema in PostgreSQL or Redshift), you can leave the schema
|
||||
field blank.
|
||||
|
||||
Click on the **Save** button to save the configuration:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_07_save_button.png
|
||||
:scale: 70%
|
||||
|
||||
When redirected back to the list of tables, you should see a message indicating
|
||||
that your table was created:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_12_table_creation_success_msg.png
|
||||
:scale: 70%
|
||||
|
||||
This message also directs you to edit the table configuration. We’ll edit a limited
|
||||
portion of the configuration now - just to get you started - and leave the rest for
|
||||
a more advanced tutorial.
|
||||
|
||||
Click on the edit button next to the table you’ve created:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_13_edit_table_config.png
|
||||
:scale: 70%
|
||||
|
||||
On the resulting page, click on the **List Table Column** tab. Here, you’ll define the
|
||||
way you can use specific columns of your table when exploring your data. We’ll run
|
||||
through these options to describe their purpose:
|
||||
|
||||
* If you want users to group metrics by a specific field, mark it as **Groupable**.
|
||||
* If you need to filter on a specific field, mark it as **Filterable**.
|
||||
* Is this field something you’d like to get the distinct count of? Check the **Count
|
||||
Distinct** box.
|
||||
* Is this a metric you want to sum, or get basic summary statistics for? The **Sum**,
|
||||
**Min**, and **Max** columns will help.
|
||||
* The **is temporal** field should be checked for any date or time fields. We’ll cover
|
||||
how this manifests itself in analyses in a moment.
|
||||
|
||||
Here’s how we’ve configured fields for the weather data. Even for measures like the
|
||||
weather measurements (precipitation, snowfall, etc.), it’s ideal to group and filter
|
||||
by these values:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_14_field_config.png
|
||||
|
||||
As with the configurations above, click the **Save** button to save these settings.
|
||||
|
||||
Exploring your data
|
||||
-------------------
|
||||
|
||||
To start exploring your data, simply click on the table name you just created in
|
||||
the list of available tables:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_15_click_table_name.png
|
||||
|
||||
By default, you’ll be presented with a Table View:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_16_datasource_chart_type.png
|
||||
|
||||
Let’s walk through a basic query to get the count of all records in our table.
|
||||
First, we’ll need to change the **Since** filter to capture the range of our data.
|
||||
You can use simple phrases to apply these filters, like "3 years ago":
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_17_choose_time_range.png
|
||||
|
||||
The upper limit for time, the **Until** filter, defaults to "now", which may or may
|
||||
not be what you want.
|
||||
|
||||
Look for the Metrics section under the **GROUP BY** header, and start typing "Count"
|
||||
- you’ll see a list of metrics matching what you type:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_18_choose_metric.png
|
||||
|
||||
Select the *COUNT(\*)* metric, then click the green **Query** button near the top
|
||||
of the explore:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_19_click_query.png
|
||||
|
||||
You’ll see your results in the table:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_20_count_star_result.png
|
||||
|
||||
Let’s group this by the *weather_description* field to get the count of records by
|
||||
the type of weather recorded by adding it to the *Group by* section:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_21_group_by.png
|
||||
|
||||
and run the query:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_22_group_by_result.png
|
||||
|
||||
Let’s find a more useful data point: the top 10 times and places that recorded the
|
||||
highest temperature in 2015.
|
||||
|
||||
We replace *weather_description* with *latitude*, *longitude* and *measurement_date* in the
|
||||
*Group by* section:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_23_group_by_more_dimensions.png
|
||||
|
||||
And replace *COUNT(\*)* with *max__measurement_flag*:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_24_max_metric.png
|
||||
|
||||
The *max__measurement_flag* metric was created when we checked the box under **Max** and
|
||||
next to the *measurement_flag* field, indicating that this field was numeric and that
|
||||
we wanted to find its maximum value when grouped by specific fields.
|
||||
|
||||
In our case, *measurement_flag* is the value of the measurement taken, which clearly
|
||||
depends on the type of measurement (the researchers recorded different values for
|
||||
precipitation and temperature). Therefore, we must filter our query only on records
|
||||
where the *weather_description* is equal to "Maximum temperature", which we do in
|
||||
the **Filters** section at the bottom of the explore:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_25_max_temp_filter.png
|
||||
|
||||
Finally, since we only care about the top 10 measurements, we limit our results to
|
||||
10 records using the *Row limit* option under the **Options** header:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_26_row_limit.png
|
||||
|
||||
We click **Query** and get the following results:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_27_top_10_max_temps.png
|
||||
|
||||
In this dataset, the maximum temperature is recorded in tenths of a degree Celsius.
|
||||
The top value of 1370, measured in the middle of Nevada, is equal to 137 C, or roughly
|
||||
278 degrees F. It’s unlikely this value was correctly recorded. We’ve already been able
|
||||
to investigate some outliers with Superset, but this just scratches the surface of what
|
||||
we can do.
|
||||
|
||||
You may want to do a couple more things with this measure:
|
||||
|
||||
* The default formatting shows values like 1.37k, which may be difficult for some
|
||||
users to read. It’s likely you may want to see the full, comma-separated value.
|
||||
You can change the formatting of any measure by editing its config (*Edit Table
|
||||
Config > List Sql Metric > Edit Metric > D3Format*)
|
||||
* Moreover, you may want to see the temperature measurements in plain degrees C,
|
||||
not tenths of a degree. Or you may want to convert the temperature to degrees
|
||||
Fahrenheit. You can change the SQL that gets executed against the database, baking
|
||||
the logic into the measure itself (*Edit Table Config > List Sql Metric > Edit
|
||||
Metric > SQL Expression*)
|
||||
|
||||
For now, though, let’s create a better visualization of these data and add it to
|
||||
a dashboard.
|
||||
|
||||
We change the Chart Type to "Distribution - Bar Chart":
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_28_bar_chart.png
|
||||
|
||||
Our filter on Maximum temperature measurements was retained, but the query and
|
||||
formatting options are dependent on the chart type, so you’ll have to set the
|
||||
values again:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_29_bar_chart_series_metrics.png
|
||||
|
||||
You should note the extensive formatting options for this chart: the ability to
|
||||
set axis labels, margins, ticks, etc. To make the data presentable to a broad
|
||||
audience, you’ll want to apply many of these to slices that end up in dashboards.
|
||||
For now, though, we run our query and get the following chart:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_30_bar_chart_results.png
|
||||
:scale: 70%
|
||||
|
||||
Creating a slice and dashboard
|
||||
------------------------------
|
||||
|
||||
This view might be interesting to researchers, so let’s save it. In Superset,
|
||||
a saved query is called a **Slice**.
|
||||
|
||||
To create a slice, click the **Save as** button near the top-left of the
|
||||
explore:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_19_click_query.png
|
||||
|
||||
A popup should appear, asking you to name the slice, and optionally add it to a
|
||||
dashboard. Since we haven’t yet created any dashboards, we can create one and
|
||||
immediately add our slice to it. Let’s do it:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_31_save_slice_to_dashboard.png
|
||||
:scale: 70%
|
||||
|
||||
Click Save, which will direct you back to your original query. We see that
|
||||
our slice and dashboard were successfully created:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_32_save_slice_confirmation.png
|
||||
:scale: 70%
|
||||
|
||||
Let’s check out our new dashboard. We click on the **Dashboards** menu:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_33_dashboard.png
|
||||
|
||||
and find the dashboard we just created:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_34_weather_dashboard.png
|
||||
|
||||
Things seemed to have worked - our slice is here!
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_35_slice_on_dashboard.png
|
||||
:scale: 70%
|
||||
|
||||
But it’s a bit smaller than we might like. Luckily, you can adjust the size
|
||||
of slices in a dashboard by clicking, holding and dragging the bottom-right
|
||||
corner to your desired dimensions:
|
||||
|
||||
.. image:: _static/images/tutorial/tutorial_36_adjust_dimensions.gif
|
||||
:scale: 120%
|
||||
|
||||
After adjusting the size, you’ll be asked to click on the icon near the
|
||||
top-right of the dashboard to save the new configuration.
|
||||
|
||||
Congrats! You’ve successfully linked, analyzed, and visualized data in Superset.
|
||||
There are a wealth of other table configuration and visualization options, so
|
||||
please start exploring and creating slices and dashboards of your own.
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
rm -rf _build
|
||||
make html
|
||||
rm -rf /tmp/superset-docs
|
||||
cp -r _build/html /tmp/superset-docs
|
||||
cp -r _build/html ../superset/static/assets/docs
|
307
docs/conf.py
|
@ -1,307 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# superset documentation build configuration file, created by
|
||||
# sphinx-quickstart on Thu Dec 17 15:42:06 2015.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import os
|
||||
import shlex
|
||||
import sys
|
||||
from typing import Any, Dict
|
||||
|
||||
import sphinx_rtd_theme
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = ".rst"
|
||||
|
||||
# The encoding of source files.
|
||||
# source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = "Apache Superset"
|
||||
copyright = "Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0."
|
||||
author = u"Apache Superset Dev"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
# version = u'1.0'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
# release = u'1.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
# today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
# today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ["_build"]
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
# default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
# add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
# add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
# show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = "sphinx"
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
# modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
# keep_warnings = False
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
html_theme_options: Dict[str, Any] = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
# html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
# html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
# html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
# html_logo = "images/s.png"
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
# html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ["_static"]
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
# html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
# html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
# html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
# html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
# html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
# html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
# html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
# html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
html_show_sourcelink = False
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
html_show_sphinx = False
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
# html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
# html_file_suffix = None
|
||||
|
||||
# Language to be used for generating the HTML full-text search index.
|
||||
# Sphinx supports the following languages:
|
||||
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
|
||||
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
|
||||
# html_search_language = 'en'
|
||||
|
||||
# A dictionary with options for the search language support, empty by default.
|
||||
# Now only 'ja' uses this config value
|
||||
# html_search_options = {'type': 'default'}
|
||||
|
||||
# The name of a javascript file (relative to the configuration directory) that
|
||||
# implements a search results scorer. If empty, the default will be used.
|
||||
# html_search_scorer = 'scorer.js'
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = "supersetdoc"
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements: Dict[str, Any] = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
# Latex figure (float) alignment
|
||||
#'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(
|
||||
master_doc,
|
||||
"superset.tex",
|
||||
u"Superset Documentation",
|
||||
u"Apache Superset Dev",
|
||||
"manual",
|
||||
)
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
# latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
# latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
# latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
# latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
# latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
# latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [(master_doc, "Superset", u"superset Documentation", [author], 1)]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
# man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(
|
||||
master_doc,
|
||||
"Superset",
|
||||
u"Superset Documentation",
|
||||
author,
|
||||
"Superset",
|
||||
"One line description of project.",
|
||||
"Miscellaneous",
|
||||
)
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
# texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
# texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
# texinfo_show_urls = 'footnote'
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
# texinfo_no_detailmenu = False
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export default {
|
||||
title: 'superset doc',
|
||||
base: '/docs',
|
||||
ignore: ['**/blog/**', 'readme.md'],
|
||||
files: ['src/**/*.{md,markdown,mdx}'],
|
||||
menu: [
|
||||
'Introduction',
|
||||
'Installation and Configuration',
|
||||
'Connecting to Databases',
|
||||
'Creating Charts and Dashboards',
|
||||
'Miscellaneous',
|
||||
'Frequently Asked Questions',
|
||||
'Contribution Guide',
|
||||
'Roadmap',
|
||||
'Security',
|
||||
],
|
||||
};
|
|
@ -1,64 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Druid
|
||||
=====
|
||||
|
||||
Superset has a native connector to Druid and a majority of Druid's
|
||||
features are accessible through Superset.
|
||||
|
||||
.. note ::
|
||||
Druid now supports SQL and can be accessed through Superset's
|
||||
SQLAlchemy connector. The long-term vision is to deprecate
|
||||
the Druid native REST connector and query Druid exclusively through
|
||||
the SQL interface.
|
||||
|
||||
Aggregations
|
||||
------------
|
||||
|
||||
Common aggregations or Druid metrics can be defined and used in Superset.
|
||||
The first and simpler use case is to use the checkbox matrix expose in your
|
||||
datasource's edit view (``Sources -> Druid Datasources ->
|
||||
[your datasource] -> Edit -> [tab] List Druid Column``).
|
||||
Clicking the ``GroupBy`` and ``Filterable`` checkboxes will make the column
|
||||
appear in the related dropdowns while in explore view. Checking
|
||||
``Count Distinct``, ``Min``, ``Max`` or ``Sum`` will result in creating
|
||||
new metrics that will appear in the ``List Druid Metric`` tab upon saving the
|
||||
datasource. By editing these metrics, you'll notice that their ``json``
|
||||
element corresponds to Druid aggregation definition. You can create your own
|
||||
aggregations manually from the ``List Druid Metric`` tab following Druid
|
||||
documentation.
|
||||
|
||||
.. image:: _static/images/druid_agg.png
|
||||
:scale: 50 %
|
||||
|
||||
Post-Aggregations
|
||||
-----------------
|
||||
|
||||
Druid supports post aggregation and this works in Superset. All you have to
|
||||
do is create a metric, much like you would create an aggregation manually,
|
||||
but specify ``postagg`` as a ``Metric Type``. You then have to provide a valid
|
||||
json post-aggregation definition (as specified in the Druid docs) in the
|
||||
Json field.
|
||||
|
||||
|
||||
Unsupported Features
|
||||
--------------------
|
||||
|
||||
.. note ::
|
||||
Unclear at this point, this section of the documentation could use
|
||||
some input.
|
346
docs/faq.rst
|
@ -1,346 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
FAQ
|
||||
===
|
||||
|
||||
|
||||
Can I query/join multiple tables at one time?
|
||||
---------------------------------------------
|
||||
Not directly no. A Superset SQLAlchemy datasource can only be a single table
|
||||
or a view.
|
||||
|
||||
When working with tables, the solution would be to materialize
|
||||
a table that contains all the fields needed for your analysis, most likely
|
||||
through some scheduled batch process.
|
||||
|
||||
A view is a simple logical layer that abstract an arbitrary SQL queries as
|
||||
a virtual table. This can allow you to join and union multiple tables, and
|
||||
to apply some transformation using arbitrary SQL expressions. The limitation
|
||||
there is your database performance as Superset effectively will run a query
|
||||
on top of your query (view). A good practice may be to limit yourself to
|
||||
joining your main large table to one or many small tables only, and avoid
|
||||
using ``GROUP BY`` where possible as Superset will do its own ``GROUP BY`` and
|
||||
doing the work twice might slow down performance.
|
||||
|
||||
Whether you use a table or a view, the important factor is whether your
|
||||
database is fast enough to serve it in an interactive fashion to provide
|
||||
a good user experience in Superset.
|
||||
|
||||
|
||||
How BIG can my data source be?
|
||||
------------------------------
|
||||
|
||||
It can be gigantic! As mentioned above, the main criteria is whether your
|
||||
database can execute queries and return results in a time frame that is
|
||||
acceptable to your users. Many distributed databases out there can execute
|
||||
queries that scan through terabytes in an interactive fashion.
|
||||
|
||||
|
||||
How do I create my own visualization?
|
||||
-------------------------------------
|
||||
|
||||
We are planning on making it easier to add new visualizations to the
|
||||
framework, in the meantime, we've tagged a few pull requests as
|
||||
``example`` to give people examples of how to contribute new
|
||||
visualizations.
|
||||
|
||||
https://github.com/airbnb/superset/issues?q=label%3Aexample+is%3Aclosed
|
||||
|
||||
|
||||
Can I upload and visualize csv data?
|
||||
------------------------------------
|
||||
|
||||
Yes, using the ``Upload a CSV`` button under the ``Sources`` menu item.
|
||||
This brings up a form that allows you specify required information.
|
||||
After creating the table from CSV, it can then be loaded like any
|
||||
other on the ``Sources -> Tables`` page.
|
||||
|
||||
|
||||
Why are my queries timing out?
|
||||
------------------------------
|
||||
|
||||
There are many reasons may cause long query timing out.
|
||||
|
||||
|
||||
- For running long query from Sql Lab, by default Superset allows it run as long as 6 hours before it being killed by celery. If you want to increase the time for running query, you can specify the timeout in configuration. For example:
|
||||
|
||||
``SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6``
|
||||
|
||||
|
||||
- Superset is running on gunicorn web server, which may time out web requests. If you want to increase the default (50), you can specify the timeout when starting the web server with the ``-t`` flag, which is expressed in seconds.
|
||||
|
||||
``superset runserver -t 300``
|
||||
|
||||
- If you are seeing timeouts (504 Gateway Time-out) when loading dashboard or explore slice, you are probably behind gateway or proxy server (such as Nginx). If it did not receive a timely response from Superset server (which is processing long queries), these web servers will send 504 status code to clients directly. Superset has a client-side timeout limit to address this issue. If query didn't come back within clint-side timeout (60 seconds by default), Superset will display warning message to avoid gateway timeout message. If you have a longer gateway timeout limit, you can change the timeout settings in ``superset_config.py``:
|
||||
|
||||
``SUPERSET_WEBSERVER_TIMEOUT = 60``
|
||||
|
||||
|
||||
Why is the map not visible in the mapbox visualization?
|
||||
-------------------------------------------------------
|
||||
|
||||
You need to register to mapbox.com, get an API key and configure it as
|
||||
``MAPBOX_API_KEY`` in ``superset_config.py``.
|
||||
|
||||
|
||||
How to add dynamic filters to a dashboard?
|
||||
------------------------------------------
|
||||
|
||||
It's easy: use the ``Filter Box`` widget, build a slice, and add it to your
|
||||
dashboard.
|
||||
|
||||
The ``Filter Box`` widget allows you to define a query to populate dropdowns
|
||||
that can be used for filtering. To build the list of distinct values, we
|
||||
run a query, and sort the result by the metric you provide, sorting
|
||||
descending.
|
||||
|
||||
The widget also has a checkbox ``Date Filter``, which enables time filtering
|
||||
capabilities to your dashboard. After checking the box and refreshing, you'll
|
||||
see a ``from`` and a ``to`` dropdown show up.
|
||||
|
||||
By default, the filtering will be applied to all the slices that are built
|
||||
on top of a datasource that shares the column name that the filter is based
|
||||
on. It's also a requirement for that column to be checked as "filterable"
|
||||
in the column tab of the table editor.
|
||||
|
||||
But what about if you don't want certain widgets to get filtered on your
|
||||
dashboard? You can do that by editing your dashboard, and in the form,
|
||||
edit the ``JSON Metadata`` field, more specifically the
|
||||
``filter_immune_slices`` key, that receives an array of sliceIds that should
|
||||
never be affected by any dashboard level filtering.
|
||||
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"filter_immune_slices": [324, 65, 92],
|
||||
"expanded_slices": {},
|
||||
"filter_immune_slice_fields": {
|
||||
"177": ["country_name", "__time_range"],
|
||||
"32": ["__time_range"]
|
||||
},
|
||||
"timed_refresh_immune_slices": [324]
|
||||
}
|
||||
|
||||
In the json blob above, slices 324, 65 and 92 won't be affected by any
|
||||
dashboard level filtering.
|
||||
|
||||
Now note the ``filter_immune_slice_fields`` key. This one allows you to
|
||||
be more specific and define for a specific slice_id, which filter fields
|
||||
should be disregarded.
|
||||
|
||||
Note the use of the ``__time_range`` keyword, which is reserved for dealing
|
||||
with the time boundary filtering mentioned above.
|
||||
|
||||
But what happens with filtering when dealing with slices coming from
|
||||
different tables or databases? If the column name is shared, the filter will
|
||||
be applied, it's as simple as that.
|
||||
|
||||
|
||||
How to limit the timed refresh on a dashboard?
|
||||
----------------------------------------------
|
||||
By default, the dashboard timed refresh feature allows you to automatically re-query every slice
|
||||
on a dashboard according to a set schedule. Sometimes, however, you won't want all of the slices
|
||||
to be refreshed - especially if some data is slow moving, or run heavy queries. To exclude specific
|
||||
slices from the timed refresh process, add the ``timed_refresh_immune_slices`` key to the dashboard
|
||||
``JSON Metadata`` field:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"filter_immune_slices": [],
|
||||
"expanded_slices": {},
|
||||
"filter_immune_slice_fields": {},
|
||||
"timed_refresh_immune_slices": [324]
|
||||
}
|
||||
|
||||
In the example above, if a timed refresh is set for the dashboard, then every slice except 324 will
|
||||
be automatically re-queried on schedule.
|
||||
|
||||
Slice refresh will also be staggered over the specified period. You can turn off this staggering
|
||||
by setting the ``stagger_refresh`` to ``false`` and modify the stagger period by setting
|
||||
``stagger_time`` to a value in milliseconds in the ``JSON Metadata`` field:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"stagger_refresh": false,
|
||||
"stagger_time": 2500
|
||||
}
|
||||
|
||||
Here, the entire dashboard will refresh at once if periodic refresh is on. The stagger time of
|
||||
2.5 seconds is ignored.
|
||||
|
||||
Why does 'flask fab' or superset freezed/hung/not responding when started (my home directory is NFS mounted)?
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
By default, superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS.
|
||||
|
||||
__ https://www.sqlite.org/lockingv3.html
|
||||
|
||||
You can override this path using the ``SUPERSET_HOME`` environment variable.
|
||||
|
||||
Another work around is to change where superset stores the sqlite database by adding ``SQLALCHEMY_DATABASE_URI = 'sqlite:////new/location/superset.db'`` in superset_config.py (create the file if needed), then adding the directory where superset_config.py lives to PYTHONPATH environment variable (e.g. ``export PYTHONPATH=/opt/logs/sandbox/airbnb/``).
|
||||
|
||||
What if the table schema changed?
|
||||
---------------------------------
|
||||
|
||||
Table schemas evolve, and Superset needs to reflect that. It's pretty common
|
||||
in the life cycle of a dashboard to want to add a new dimension or metric.
|
||||
To get Superset to discover your new columns, all you have to do is to
|
||||
go to ``Menu -> Sources -> Tables``, click the ``edit`` icon next to the
|
||||
table who's schema has changed, and hit ``Save`` from the ``Detail`` tab.
|
||||
Behind the scene, the new columns will get merged it. Following this,
|
||||
you may want to
|
||||
re-edit the table afterwards to configure the ``Column`` tab, check the
|
||||
appropriate boxes and save again.
|
||||
|
||||
How do I go about developing a new visualization type?
|
||||
------------------------------------------------------
|
||||
Here's an example as a Github PR with comments that describe what the
|
||||
different sections of the code do:
|
||||
https://github.com/airbnb/superset/pull/3013
|
||||
|
||||
What database engine can I use as a backend for Superset?
|
||||
---------------------------------------------------------
|
||||
|
||||
To clarify, the *database backend* is an OLTP database used by Superset to store its internal
|
||||
information like your list of users, slices and dashboard definitions.
|
||||
|
||||
Superset is tested using Mysql, Postgresql and Sqlite for its backend. It's recommended you
|
||||
install Superset on one of these database server for production.
|
||||
|
||||
Using a column-store, non-OLTP databases like Vertica, Redshift or Presto as a database backend simply won't work as these databases are not designed for this type of workload. Installation on Oracle, Microsoft SQL Server, or other OLTP databases may work but isn't tested.
|
||||
|
||||
Please note that pretty much any databases that have a SqlAlchemy integration should work perfectly fine as a datasource for Superset, just not as the OLTP backend.
|
||||
|
||||
How can i configure OAuth authentication and authorization?
|
||||
-----------------------------------------------------------
|
||||
|
||||
You can take a look at this Flask-AppBuilder `configuration example
|
||||
<https://github.com/dpgaspar/flask-appbuilder/blob/master/examples/oauth/config.py>`_.
|
||||
|
||||
How can I set a default filter on my dashboard?
|
||||
-----------------------------------------------
|
||||
|
||||
Easy. Simply apply the filter and save the dashboard while the filter
|
||||
is active.
|
||||
|
||||
How do I get Superset to refresh the schema of my table?
|
||||
--------------------------------------------------------
|
||||
|
||||
When adding columns to a table, you can have Superset detect and merge the
|
||||
new columns in by using the "Refresh Metadata" action in the
|
||||
``Source -> Tables`` page. Simply check the box next to the tables
|
||||
you want the schema refreshed, and click ``Actions -> Refresh Metadata``.
|
||||
|
||||
Is there a way to force the use specific colors?
|
||||
------------------------------------------------
|
||||
|
||||
It is possible on a per-dashboard basis by providing a mapping of
|
||||
labels to colors in the ``JSON Metadata`` attribute using the
|
||||
``label_colors`` key.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"label_colors": {
|
||||
"Girls": "#FF69B4",
|
||||
"Boys": "#ADD8E6"
|
||||
}
|
||||
}
|
||||
|
||||
Does Superset work with [insert database engine here]?
|
||||
------------------------------------------------------
|
||||
|
||||
The community over time has curated a list of databases that work well with
|
||||
Superset in the :ref:`ref_database_deps` section of the docs. Database
|
||||
engines not listed in this page may work too. We rely on the
|
||||
community to contribute to this knowledge base.
|
||||
|
||||
.. _SQLAlchemy dialect: https://docs.sqlalchemy.org/en/latest/dialects/
|
||||
.. _DBAPI driver: https://www.python.org/dev/peps/pep-0249/
|
||||
|
||||
For a database engine to be supported in Superset through the
|
||||
SQLAlchemy connector, it requires having a Python compliant
|
||||
`SQLAlchemy dialect`_ as well as a
|
||||
`DBAPI driver`_ defined.
|
||||
Database that have limited SQL support may
|
||||
work as well. For instance it's possible to connect
|
||||
to Druid through the SQLAlchemy connector even though Druid does not support
|
||||
joins and subqueries. Another key element for a database to be supported is through
|
||||
the Superset `Database Engine Specification
|
||||
<https://github.com/apache/incubator-superset/blob/master/superset/db_engine_specs.py>`_
|
||||
interface. This interface allows for defining database-specific configurations
|
||||
and logic
|
||||
that go beyond the SQLAlchemy and DBAPI scope. This includes features like:
|
||||
|
||||
|
||||
* date-related SQL function that allow Superset to fetch different
|
||||
time granularities when running time-series queries
|
||||
* whether the engine supports subqueries. If false, Superset may run 2-phase
|
||||
queries to compensate for the limitation
|
||||
* methods around processing logs and inferring the percentage of completion
|
||||
of a query
|
||||
* technicalities as to how to handle cursors and connections if the driver
|
||||
is not standard DBAPI
|
||||
* more, read the code for more details
|
||||
|
||||
Beyond the SQLAlchemy connector, it's also possible, though much more
|
||||
involved, to extend Superset and write
|
||||
your own connector. The only example of this at the moment is the Druid
|
||||
connector, which is getting superseded by Druid's growing SQL support and
|
||||
the recent availability of a DBAPI and SQLAlchemy driver. If the database
|
||||
you are considering integrating has any kind of of SQL support, it's probably
|
||||
preferable to go the SQLAlchemy route. Note that for a native connector to
|
||||
be possible the database needs to have support for running OLAP-type queries
|
||||
and should be able to things that are typical in basic SQL:
|
||||
|
||||
- aggregate data
|
||||
- apply filters (==, !=, >, <, >=, <=, IN, ...)
|
||||
- apply HAVING-type filters
|
||||
- be schema-aware, expose columns and types
|
||||
|
||||
|
||||
Does Superset offer a public API?
|
||||
---------------------------------
|
||||
|
||||
Yes, a public REST API, and the surface of that API formal
|
||||
is expanding steadily. Some of the original vision for the collection
|
||||
of endpoints under ``/api/v1`` was originally specified in
|
||||
`SIP-17 <https://github.com/apache/incubator-superset/issues/7259>`_ and
|
||||
constant progress has been made to cover more and more use cases.
|
||||
|
||||
The API available is documented using `Swagger <https://swagger.io/>`_
|
||||
and the documentation
|
||||
can be made available under ``/swagger/v1`` by enabling
|
||||
the ``FAB_API_SWAGGER_UI = True`` configuration flag.
|
||||
|
||||
There are other undocumented [private] ways to interact with Superset
|
||||
programmatically that offer no guarantees and are not recommended but
|
||||
may fit your use case temporarily:
|
||||
|
||||
- using the ORM (SQLAlchemy) directly
|
||||
- using the internal FAB ModelView API (to be deprecated in Superset)
|
||||
- altering the source code in your fork
|
||||
|
||||
|
||||
How do I create a new visualization?
|
||||
------------------------------------
|
||||
|
||||
The process has been documented in the
|
||||
`So, You Want to Build a Superset Viz Plugin... <https://preset.io/blog/2020-07-02-hello-world/>`_ blog post.
|
206
docs/gallery.rst
|
@ -1,206 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Visualizations Gallery
|
||||
======================
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/area.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/bar.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/big_number.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/big_number_total.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/box_plot.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/bubble.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/bullet.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/cal_heatmap.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/chord.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/compare.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/country_map.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_arc.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_geojson.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_grid.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_hex.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_multi.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_path.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_polygon.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_scatter.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/deck_screengrid.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/directed_force.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/dist_bar.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/dual_line.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/event_flow.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/filter_box.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/heatmap.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/histogram.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/horizon.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/iframe.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/line.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/mapbox.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/markup.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/paired_ttest.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/para.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/partition.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/pie.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/pivot_table.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/rose.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/sankey.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/separator.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/sunburst.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/table.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/time_pivot.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/time_table.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/treemap.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/word_cloud.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: _static/images/viz_thumbnails/world_map.png
|
||||
:scale: 25 %
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
siteMetadata: {
|
||||
title: `Superset`,
|
||||
description: `Community website for Apache Superset, a data visualization and data exploration platform`,
|
||||
author: `@apache-superset`,
|
||||
},
|
||||
plugins: [
|
||||
`gatsby-plugin-sass`,
|
||||
`gatsby-theme-docz`,
|
||||
`gatsby-plugin-react-helmet`,
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `images`,
|
||||
path: `${__dirname}/src/images`,
|
||||
},
|
||||
},
|
||||
`gatsby-transformer-sharp`,
|
||||
`gatsby-plugin-sharp`,
|
||||
{
|
||||
resolve: `gatsby-plugin-google-fonts`,
|
||||
options: {
|
||||
fonts: [
|
||||
`Inter`,
|
||||
`source sans pro\:300,400,400i,700`, // you can also specify font weights and styles
|
||||
],
|
||||
display: 'swap',
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-plugin-eslint',
|
||||
options: {
|
||||
test: /\.js$|\.jsx$/,
|
||||
exclude: /(node_modules|.cache|public|gatsby-config.js)/,
|
||||
stages: ['develop'],
|
||||
options: {
|
||||
emitWarning: true,
|
||||
failOnError: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
'gatsby-plugin-antd',
|
||||
'gatsby-plugin-emotion',
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: `gatsby-starter-default`,
|
||||
short_name: `starter`,
|
||||
start_url: `/`,
|
||||
},
|
||||
},
|
||||
// this (optional) plugin enables Progressive Web App + Offline functionality
|
||||
// To learn more, visit: https://gatsby.dev/offline
|
||||
// `gatsby-plugin-offline`,
|
||||
],
|
||||
};
|
|
@ -1,124 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Importing and Exporting Datasources
|
||||
===================================
|
||||
|
||||
The superset cli allows you to import and export datasources from and to YAML.
|
||||
Datasources include both databases and druid clusters. The data is expected to be organized in the following hierarchy: ::
|
||||
|
||||
.
|
||||
├──databases
|
||||
| ├──database_1
|
||||
| | ├──table_1
|
||||
| | | ├──columns
|
||||
| | | | ├──column_1
|
||||
| | | | ├──column_2
|
||||
| | | | └──... (more columns)
|
||||
| | | └──metrics
|
||||
| | | ├──metric_1
|
||||
| | | ├──metric_2
|
||||
| | | └──... (more metrics)
|
||||
| | └── ... (more tables)
|
||||
| └── ... (more databases)
|
||||
└──druid_clusters
|
||||
├──cluster_1
|
||||
| ├──datasource_1
|
||||
| | ├──columns
|
||||
| | | ├──column_1
|
||||
| | | ├──column_2
|
||||
| | | └──... (more columns)
|
||||
| | └──metrics
|
||||
| | ├──metric_1
|
||||
| | ├──metric_2
|
||||
| | └──... (more metrics)
|
||||
| └── ... (more datasources)
|
||||
└── ... (more clusters)
|
||||
|
||||
|
||||
Exporting Datasources to YAML
|
||||
-----------------------------
|
||||
You can print your current datasources to stdout by running: ::
|
||||
|
||||
superset export_datasources
|
||||
|
||||
|
||||
To save your datasources to a file run: ::
|
||||
|
||||
superset export_datasources -f <filename>
|
||||
|
||||
|
||||
By default, default (null) values will be omitted. Use the ``-d`` flag to include them.
|
||||
If you want back references to be included (e.g. a column to include the table id
|
||||
it belongs to) use the ``-b`` flag.
|
||||
|
||||
Alternatively, you can export datasources using the UI:
|
||||
|
||||
1. Open **Sources** -> **Databases** to export all tables associated to a
|
||||
single or multiple databases. (**Tables** for one or more tables,
|
||||
**Druid Clusters** for clusters, **Druid Datasources** for datasources)
|
||||
#. Select the items you would like to export
|
||||
#. Click **Actions** -> **Export to YAML**
|
||||
#. If you want to import an item that you exported through the UI, you
|
||||
will need to nest it inside its parent element, e.g. a `database`
|
||||
needs to be nested under `databases` a `table` needs to be
|
||||
nested inside a `database` element.
|
||||
|
||||
Exporting the complete supported YAML schema
|
||||
--------------------------------------------
|
||||
In order to obtain an exhaustive list of all fields you can import using the YAML import run: ::
|
||||
|
||||
superset export_datasource_schema
|
||||
|
||||
Again, you can use the ``-b`` flag to include back references.
|
||||
|
||||
|
||||
Importing Datasources from YAML
|
||||
-------------------------------
|
||||
In order to import datasources from a YAML file(s), run: ::
|
||||
|
||||
superset import_datasources -p <path or filename>
|
||||
|
||||
If you supply a path all files ending with ``*.yaml`` or ``*.yml`` will be parsed.
|
||||
You can apply additional flags e.g.: ::
|
||||
|
||||
superset import_datasources -p <path> -r
|
||||
|
||||
Will search the supplied path recursively.
|
||||
|
||||
The sync flag ``-s`` takes parameters in order to sync the supplied elements with
|
||||
your file. Be careful this can delete the contents of your meta database. Example:
|
||||
|
||||
superset import_datasources -p <path / filename> -s columns,metrics
|
||||
|
||||
This will sync all ``metrics`` and ``columns`` for all datasources found in the
|
||||
``<path / filename>`` in the Superset meta database. This means columns and metrics
|
||||
not specified in YAML will be deleted. If you would add ``tables`` to ``columns,metrics``
|
||||
those would be synchronised as well.
|
||||
|
||||
|
||||
If you don't supply the sync flag (``-s``) importing will only add and update (override) fields.
|
||||
E.g. you can add a ``verbose_name`` to the column ``ds`` in the table ``random_time_series`` from the example datasets
|
||||
by saving the following YAML to file and then running the ``import_datasources`` command. ::
|
||||
|
||||
databases:
|
||||
- database_name: main
|
||||
tables:
|
||||
- table_name: random_time_series
|
||||
columns:
|
||||
- column_name: ds
|
||||
verbose_name: datetime
|
176
docs/index.rst
|
@ -1,176 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
|apache_img| |superset_img|
|
||||
|
||||
.. |apache_img| image:: _static/images/apache_feather.png
|
||||
:width: 7%
|
||||
:target: http://www.apache.org/
|
||||
:alt: The Apache Software Foundation
|
||||
|
||||
.. |superset_img| image:: _static/images/s.png
|
||||
:width: 25%
|
||||
|
||||
Apache Superset (incubating)
|
||||
''''''''''''''''''''''''''''
|
||||
|
||||
Apache Superset (incubating) is a modern, enterprise-ready business
|
||||
intelligence web application
|
||||
|
||||
|
||||
----------------
|
||||
|
||||
.. important::
|
||||
|
||||
**Disclaimer**: Apache Superset is an effort undergoing incubation at The
|
||||
Apache Software Foundation (ASF), sponsored by the Apache Incubator.
|
||||
Incubation is required of all newly accepted projects until a further
|
||||
review indicates that the infrastructure, communications, and
|
||||
decision making process have stabilized in a manner consistent with
|
||||
other successful ASF projects. While incubation status is not
|
||||
necessarily a reflection of the completeness or stability of
|
||||
the code, it does indicate that the project has yet to be fully
|
||||
endorsed by the ASF.
|
||||
|
||||
.. note:: Apache Superset, Superset, Apache, the Apache feather logo, and
|
||||
the Apache Superset project logo are either registered trademarks or
|
||||
trademarks of The Apache Software Foundation in the United States
|
||||
and other countries.
|
||||
|
||||
Superset Resources
|
||||
==================
|
||||
- Versioned versions of this documentation: https://readthedocs.org/projects/apache-superset/
|
||||
- `Superset's Github <https://github.com/apache/incubator-superset>`_, note
|
||||
that `we use Github for issue tracking <https://github.com/apache/incubator-superset/issues>`_
|
||||
- Superset's
|
||||
`contribution guidelines <https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md>`_
|
||||
and
|
||||
`code of conduct <https://github.com/apache/incubator-superset/blob/master/CODE_OF_CONDUCT.md>`_
|
||||
on Github. (You can contribute to this documentation `here <https://github.com/apache/incubator-superset/tree/master/docs>`_)
|
||||
- Our `mailing list archives <https://lists.apache.org/list.html?dev@superset.apache.org>`_.
|
||||
To subscribe, send an email to ``dev-subscribe@superset.apache.org``
|
||||
- `Superset Users <https://github.com/apache/incubator-superset/blob/master/INTHEWILD.md>`_
|
||||
- `Join our commmunity Slack channel <https://join.slack.com/t/apache-superset/shared_invite/zt-g8lpruog-HeqpgYrwdfrD5OYhlU7hPQ>`_
|
||||
- `Awesome Apache Superset <https://github.com/apache-superset/awesome-apache-superset>`_ collection of learning resources from around the Internet.
|
||||
- `StackOverflow Q&A <https://stackoverflow.com/questions/tagged/apache-superset>`_
|
||||
- `Community Meetup Recordings <https://www.youtube.com/channel/UCMuwrvBsg_jjI2gLcm04R0g>`_
|
||||
|
||||
Apache Software Foundation Resources
|
||||
====================================
|
||||
- `The Apache Software Foundation Website <http://www.apache.org>`_
|
||||
- `Current Events <http://www.apache.org/events/current-event>`_
|
||||
- `License <https://www.apache.org/licenses/>`_
|
||||
- `Thanks <https://www.apache.org/foundation/thanks.html>`_ to the ASF's sponsors
|
||||
- `Sponsor Apache! <http://www.apache.org/foundation/sponsorship.html>`_
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- An intuitive interface to explore and visualize datasets, and create interactive dashboards.
|
||||
- A wide array of beautiful visualizations to showcase your data.
|
||||
- Easy, code-free, user flows to drill down and slice and dice the data underlying exposed dashboards. The dashboards and charts act as a starting point for deeper analysis.
|
||||
- A state of the art SQL editor/IDE exposing a rich metadata browser, and an easy workflow to create visualizations out of any result set.
|
||||
- An extensible, high granularity security model allowing intricate rules on who can access which product features and datasets. Integration with major authentication backends (database, OpenID, LDAP, OAuth, REMOTE_USER, ...)
|
||||
- A lightweight semantic layer, allowing to control how data sources are exposed to the user by defining dimensions and metrics
|
||||
- Out of the box support for most SQL-speaking databases
|
||||
- Deep integration with Druid allows for Superset to stay blazing fast while slicing and dicing large, realtime datasets
|
||||
- Fast loading dashboards with configurable caching
|
||||
|
||||
|
||||
Databases
|
||||
---------
|
||||
|
||||
The following RDBMS are currently supported:
|
||||
|
||||
- `Amazon Athena </installation.html#aws-athena>`_
|
||||
- `Amazon Redshift </installation.html#database-dependencies>`_
|
||||
- `Apache Drill </installation.html#apache-drill>`_
|
||||
- `Apache Druid </installation.html#druid>`_
|
||||
- `Apache Hive </installation.html#database-dependencies>`_
|
||||
- `Apache Impala </installation.html#database-dependencies>`_
|
||||
- `Apache Kylin </installation.html#database-dependencies>`_
|
||||
- `Apache Pinot </installation.html#database-dependencies/>`_
|
||||
- `Apache Spark SQL </installation.html#database-dependencies>`_
|
||||
- `BigQuery </installation.html#google-bigquery>`_
|
||||
- `ClickHouse </installation.html#database-dependencies>`_
|
||||
- `CockroachDB </installation.html#database-dependencies>`_
|
||||
- `Dremio </installation.html#dremio>`_
|
||||
- `Elasticsearch </installation.html#elasticsearch>`_
|
||||
- `Exasol </installation.html#exasol>`_
|
||||
- `Google Sheets </installation.html#database-dependencies>`_
|
||||
- `Greenplum </installation.html#database-dependencies>`_
|
||||
- `IBM Db2 </installation.html#database-dependencies>`_
|
||||
- `MySQL </installation.html#database-dependencies>`_
|
||||
- `Oracle </installation.html#database-dependencies>`_
|
||||
- `PostgreSQL </installation.html#postgresql>`_
|
||||
- `Presto </installation.html#presto>`_
|
||||
- `Snowflake </installation.html#snowflake>`_
|
||||
- `SQLite </installation.html#database-dependencies>`_
|
||||
- `SQL Server </installation.html#database-dependencies>`_
|
||||
- `Teradata </installation.html#teradata>`_
|
||||
- `Vertica </installation.html#database-dependencies>`_
|
||||
- `Hana </installation.html#hana>`_
|
||||
|
||||
Other database engines with a proper DB-API driver and SQLAlchemy dialect should
|
||||
be supported as well.
|
||||
|
||||
Screenshots
|
||||
-----------
|
||||
|
||||
.. image:: _static/images/screenshots/bank_dash.png
|
||||
|
||||
------
|
||||
|
||||
.. image:: _static/images/screenshots/explore.png
|
||||
|
||||
------
|
||||
|
||||
.. image:: _static/images/screenshots/sqllab.png
|
||||
|
||||
------
|
||||
|
||||
.. image:: _static/images/screenshots/deckgl_dash.png
|
||||
|
||||
------
|
||||
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
installation
|
||||
tutorials
|
||||
security
|
||||
sqllab
|
||||
gallery
|
||||
druid
|
||||
misc
|
||||
issue_code_reference
|
||||
faq
|
||||
|
||||
|
||||
Indices and tables
|
||||
------------------
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
|
@ -1,48 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Issue Code Reference
|
||||
====================
|
||||
|
||||
This page lists issue codes that may be displayed in Superset and provides additional context.
|
||||
|
||||
Issue 1000
|
||||
""""""""""
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
The datasource is too large to query.
|
||||
|
||||
It's likely your datasource has grown too large to run the current query, and is timing out. You can resolve this by reducing the size of your datasource or by modifying your query to only process a subset of your data.
|
||||
|
||||
Issue 1001
|
||||
""""""""""
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
The database is under an unusual load.
|
||||
|
||||
Your query may have timed out because of unusually high load on the database engine. You can make your query simpler, or wait until the database is under less load and try again.
|
||||
|
||||
Issue 1002
|
||||
""""""""""
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
The database returned an unexpected error.
|
||||
|
||||
Your query failed because of an error that occurred on the database. This may be due to a syntax error, a bug in your query, or some other internal failure within the database. This is usually not an issue within Superset, but instead a problem with the underlying database that serves your query.
|
|
@ -1,27 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
|
||||
Misc
|
||||
----
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
visualization
|
||||
videos
|
||||
import_export_datasources
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
"name": "apache-superset-docs",
|
||||
"private": true,
|
||||
"description": "The landing page and doc size for getting started with Apache Superset",
|
||||
"version": "0.1.0",
|
||||
"author": "preset.io",
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^4.2.2",
|
||||
"@emotion/core": "^10.0.28",
|
||||
"@emotion/styled": "^10.0.27",
|
||||
"@superset-ui/style": "^0.14.9",
|
||||
"antd": "^4.5.2",
|
||||
"docz": "^2.3.1",
|
||||
"emotion": "^10.0.27",
|
||||
"gatsby": "^2.24.53",
|
||||
"gatsby-dynamical-navigation": "^0.4.1",
|
||||
"gatsby-image": "^2.4.14",
|
||||
"gatsby-plugin-antd": "^2.2.0",
|
||||
"gatsby-plugin-emotion": "^4.3.10",
|
||||
"gatsby-plugin-google-fonts": "^1.0.1",
|
||||
"gatsby-plugin-manifest": "^2.4.21",
|
||||
"gatsby-plugin-offline": "^3.2.21",
|
||||
"gatsby-plugin-react-helmet": "^3.3.10",
|
||||
"gatsby-plugin-sass": "^2.3.12",
|
||||
"gatsby-plugin-sharp": "^2.6.24",
|
||||
"gatsby-source-filesystem": "^2.3.23",
|
||||
"gatsby-theme-docz": "^2.3.1",
|
||||
"gatsby-transformer-sharp": "^2.5.12",
|
||||
"node-sass": "^4.14.1",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"react-github-btn": "^1.2.0",
|
||||
"react-helmet": "^6.1.0",
|
||||
"theme-ui": "^0.3.1",
|
||||
"three": "^0.68.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-airbnb": "^18.2.0",
|
||||
"gatsby-plugin-eslint": "^2.0.8",
|
||||
"prettier": "^2.0.5",
|
||||
"typescript": "^3.9.7"
|
||||
},
|
||||
"keywords": [
|
||||
"gatsby"
|
||||
],
|
||||
"license": "0BSD",
|
||||
"scripts": {
|
||||
"build": "gatsby build",
|
||||
"develop": "gatsby develop",
|
||||
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,mdx}\"",
|
||||
"start": "npm run develop",
|
||||
"serve": "gatsby serve",
|
||||
"clean": "gatsby clean",
|
||||
"lint": "eslint src/ --ext .ts,.js,.tsx,.jsx",
|
||||
"lint-fix": "eslint --fix src/ --ext .ts,.js,.tsx,.jsx",
|
||||
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"globals": {
|
||||
"window": true,
|
||||
"console": true
|
||||
}
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gatsbyjs/gatsby/issues"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
{
|
||||
"endOfLine":"lf", "semi":false,"singleQuote":false,"tabWidth": 2,"trailingComma":"es5"
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
|
@ -1,185 +0,0 @@
|
|||
.. Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
.. Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Security
|
||||
========
|
||||
Security in Superset is handled by Flask AppBuilder (FAB). FAB is a
|
||||
"Simple and rapid application development framework, built on top of Flask.".
|
||||
FAB provides authentication, user management, permissions and roles.
|
||||
Please read its `Security documentation
|
||||
<https://flask-appbuilder.readthedocs.io/en/latest/security.html>`_.
|
||||
|
||||
Provided Roles
|
||||
--------------
|
||||
Superset ships with a set of roles that are handled by Superset itself.
|
||||
You can assume that these roles will stay up-to-date as Superset evolves.
|
||||
Even though it's possible for ``Admin`` users to do so, it is not recommended
|
||||
that you alter these roles in any way by removing
|
||||
or adding permissions to them as these roles will be re-synchronized to
|
||||
their original values as you run your next ``superset init`` command.
|
||||
|
||||
Since it's not recommended to alter the roles described here, it's right
|
||||
to assume that your security strategy should be to compose user access based
|
||||
on these base roles and roles that you create. For instance you could
|
||||
create a role ``Financial Analyst`` that would be made of a set of permissions
|
||||
to a set of data sources (tables) and/or databases. Users would then be
|
||||
granted ``Gamma``, ``Financial Analyst``, and perhaps ``sql_lab``.
|
||||
|
||||
Admin
|
||||
"""""
|
||||
Admins have all possible rights, including granting or revoking rights from
|
||||
other users and altering other people's slices and dashboards.
|
||||
|
||||
Alpha
|
||||
"""""
|
||||
Alpha users have access to all data sources, and all features except SQLLab and
|
||||
security, so they cannot grant or revoke access from other users.
|
||||
They are also limited to altering the objects that they
|
||||
own. Alpha users can add and alter data sources.
|
||||
|
||||
Gamma
|
||||
"""""
|
||||
Gamma users have limited access. They can only consume data coming from data sources
|
||||
they have been given access to through another complementary role.
|
||||
They only have access to view the slices and
|
||||
dashboards made from data sources that they have access to. Currently Gamma
|
||||
users are not able to alter or add data sources. We assume that they are
|
||||
mostly content consumers, though they can create slices and dashboards.
|
||||
|
||||
Also note that when Gamma users look at the dashboards and slices list view,
|
||||
they will only see the objects that they have access to.
|
||||
|
||||
sql_lab
|
||||
"""""""
|
||||
The ``sql_lab`` role grants access to SQL Lab. Note that while ``Admin``
|
||||
users have access to all databases by default, both ``Alpha`` and ``Gamma``
|
||||
users need to be given access on a per database basis.
|
||||
|
||||
Public
|
||||
""""""
|
||||
It's possible to allow logged out users to access some Superset features.
|
||||
|
||||
By setting ``PUBLIC_ROLE_LIKE_GAMMA = True`` in your ``superset_config.py``,
|
||||
you grant public role the same set of permissions as for the GAMMA role.
|
||||
This is useful if one wants to enable anonymous users to view
|
||||
dashboards. Explicit grant on specific datasets is still required, meaning
|
||||
that you need to edit the ``Public`` role and add the Public data sources
|
||||
to the role manually.
|
||||
|
||||
|
||||
Managing Gamma per data source access
|
||||
-------------------------------------
|
||||
Here's how to provide users access to only specific datasets. First make
|
||||
sure the users with limited access have [only] the Gamma role assigned to
|
||||
them. Second, create a new role (``Menu -> Security -> List Roles``) and
|
||||
click the ``+`` sign.
|
||||
|
||||
.. image:: _static/images/create_role.png
|
||||
:scale: 50 %
|
||||
|
||||
This new window allows you to give this new role a name, attribute it to users
|
||||
and select the tables in the ``Permissions`` dropdown. To select the data
|
||||
sources you want to associate with this role, simply click on the dropdown
|
||||
and use the typeahead to search for your table names.
|
||||
|
||||
You can then confirm with your Gamma users that they see the objects
|
||||
(dashboards and slices) associated with the tables related to their roles.
|
||||
|
||||
|
||||
Customizing
|
||||
-----------
|
||||
|
||||
The permissions exposed by FAB are very granular and allow for a great level
|
||||
of customization. FAB creates many permissions automagically for each model
|
||||
that is created (can_add, can_delete, can_show, can_edit, ...) as well as for
|
||||
each view. On top of that, Superset can expose more granular permissions like
|
||||
``all_datasource_access``.
|
||||
|
||||
We do not recommend altering the 3 base roles as there
|
||||
are a set of assumptions that Superset is built upon. It is possible though for
|
||||
you to create your own roles, and union them to existing ones.
|
||||
|
||||
Permissions
|
||||
"""""""""""
|
||||
|
||||
Roles are composed of a set of permissions, and Superset has many categories
|
||||
of permissions. Here are the different categories of permissions:
|
||||
|
||||
- **Model & action**: models are entities like ``Dashboard``,
|
||||
``Slice``, or ``User``. Each model has a fixed set of permissions, like
|
||||
``can_edit``, ``can_show``, ``can_delete``, ``can_list``, ``can_add``, and
|
||||
so on. By adding ``can_delete on Dashboard`` to a role, and granting that
|
||||
role to a user, this user will be able to delete dashboards.
|
||||
- **Views**: views are individual web pages, like the ``explore`` view or the
|
||||
``SQL Lab`` view. When granted to a user, he/she will see that view in its menu items, and be able to load that page.
|
||||
- **Data source**: For each data source, a permission is created. If the user
|
||||
does not have the ``all_datasource_access`` permission granted, the user
|
||||
will only be able to see Slices or explore the data sources that are granted
|
||||
to them
|
||||
- **Database**: Granting access to a database allows for the user to access
|
||||
all data sources within that database, and will enable the user to query
|
||||
that database in SQL Lab, provided that the SQL Lab specific permission
|
||||
have been granted to the user
|
||||
|
||||
|
||||
Restricting access to a subset of data sources
|
||||
""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
The best way to go is probably to give user ``Gamma`` plus one or many other
|
||||
roles that would add access to specific data sources. We recommend that you
|
||||
create individual roles for each access profile. Say people in your finance
|
||||
department might have access to a set of databases and data sources, and
|
||||
these permissions can be consolidated in a single role. Users with this
|
||||
profile then need to be attributed ``Gamma`` as a foundation to the models
|
||||
and views they can access, and that ``Finance`` role that is a collection
|
||||
of permissions to data objects.
|
||||
|
||||
One user can have many roles, so a finance executive could be granted
|
||||
``Gamma``, ``Finance``, and perhaps another ``Executive`` role that gather
|
||||
a set of data sources that power dashboards only made available to executives.
|
||||
When looking at its dashboard list, this user will only see the
|
||||
list of dashboards it has access to, based on the roles and
|
||||
permissions that were attributed.
|
||||
|
||||
|
||||
Restricting access to a subset of a particular table
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Using ``Row level security filters`` (under the ``Security`` menu) you can create
|
||||
filters that are assigned to a particular table, as well as a set of roles.
|
||||
Say people in your finance department should only have access to rows where
|
||||
``department = "finance"``. You could create a ``Row level security filter``
|
||||
with that clause, and assign it to your ``Finance`` role, as well as the
|
||||
applicable table.
|
||||
|
||||
The ``clause`` field can contain arbitrary text which is then added to the generated
|
||||
SQL statement's ``WHERE`` clause. So you could even do something like create a
|
||||
filter for the last 30 days and apply it to a specific role, with a clause like
|
||||
``date_field > DATE_SUB(NOW(), INTERVAL 30 DAY)``. It can also support multiple
|
||||
conditions: ``client_id = 6 AND advertiser="foo"``, etc.
|
||||
|
||||
All relevant ``Row level security filters`` will be ANDed together, so it's
|
||||
possible to create a situation where two roles conflict in such a way as to
|
||||
limit a table subset to empty. For example, the filters ``client_id=4`` and
|
||||
and ``client_id=5``, applied to a role, will result in users of that role having
|
||||
``client_id=4 AND client_id=5`` added to their query, which can never be true.
|
||||
|
||||
Supported Authentication Types
|
||||
""""""""""""""""""""""""""""""
|
||||
Superset has been written on top of `Flask-AppBuilder <https://flask-appbuilder.readthedocs.io/en/latest/>`_, So it uses the Authentication Types that Flask-ApBuilder.
|
||||
Fore more detail please follow this link:
|
||||
`Supported Authentication Types on Flask-AppBuilder <https://flask-appbuilder.readthedocs.io/en/latest/security.html#supported-authentication-types>`_
|
|
@ -0,0 +1,158 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Layout } from 'antd';
|
||||
import { css } from '@emotion/core';
|
||||
import { GithubOutlined, SlackSquareOutlined } from '@ant-design/icons';
|
||||
|
||||
const { Footer } = Layout;
|
||||
|
||||
const footerStyle = css`
|
||||
background-color: #323232;
|
||||
text-align: center;
|
||||
color: #ccc;
|
||||
.apacheLinks {
|
||||
a {
|
||||
color: white;
|
||||
margin: 5px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const copyrightStyle = css`
|
||||
font-size: 11px;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
`;
|
||||
const apacheLinksStyle = css`
|
||||
text-align: center;
|
||||
`;
|
||||
const iconContainerStyle = css`
|
||||
padding: 30px;
|
||||
background-color: #323232;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.icons {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
svg {
|
||||
margin-top: 15px;
|
||||
color: #ccc;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin: 0 15px;
|
||||
}
|
||||
.svg {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-top: -15px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const LayoutFooter = () => (
|
||||
<>
|
||||
<Footer css={footerStyle}>
|
||||
<div css={apacheLinksStyle} className="apacheLinks">
|
||||
<a
|
||||
href="https://www.apache.org/security/"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Security |
|
||||
</a>
|
||||
<a
|
||||
href="https://www.apache.org/foundation/sponsorship.html"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Donate |
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://www.apache.org/foundation/thanks.html"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Thanks
|
||||
</a>
|
||||
</div>
|
||||
<div css={iconContainerStyle}>
|
||||
<div className="icons">
|
||||
<a
|
||||
href="https://apache-superset.slack.com/join/shared_invite/zt-g8lpruog-HeqpgYrwdfrD5OYhlU7hPQ#/"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<SlackSquareOutlined className="icon" />
|
||||
</a>
|
||||
<a
|
||||
href="https://github.com/apache/incubator-superset"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<GithubOutlined className="icon" />
|
||||
</a>
|
||||
<a
|
||||
href="https://stackoverflow.com/questions/tagged/apache-superset+superset"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<img
|
||||
alt="StackOverflow"
|
||||
src="/images/so-icon.svg"
|
||||
className="icon svg"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div css={copyrightStyle}>
|
||||
© Copyright
|
||||
{' '}
|
||||
{new Date().getFullYear()}
|
||||
,
|
||||
<a href="http://www.apache.org/" target="_blank" rel="noreferrer">
|
||||
The Apache Software Fountation
|
||||
</a>
|
||||
, Licensed under the Apache
|
||||
<a
|
||||
href="https://www.apache.org/licenses/"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
License.
|
||||
</a>
|
||||
{' '}
|
||||
<br />
|
||||
<div>
|
||||
Disclaimer: Apache Superset is an effort undergoing incubation at The
|
||||
Apache Software Foundation (ASF), sponsored by the Apache Incubator.
|
||||
Incubation is required of all newly accepted projects until a further
|
||||
review indicates that the infrastructure, communications, and decision
|
||||
making process have stabilized in a manner consistent with other
|
||||
successful ASF projects. While incubation status is not necessarily a
|
||||
reflection of the completeness or stability of the code, it does
|
||||
indicate that the project has yet to be fully endorsed by the ASF.
|
||||
</div>
|
||||
</div>
|
||||
</Footer>
|
||||
</>
|
||||
);
|
||||
|
||||
export default LayoutFooter;
|
|
@ -0,0 +1,111 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { useStaticQuery, graphql } from 'gatsby';
|
||||
import Img from 'gatsby-image';
|
||||
|
||||
interface Props {
|
||||
imageName?: string;
|
||||
type?: string;
|
||||
width?: string;
|
||||
height?: string;
|
||||
otherProps?: any;
|
||||
}
|
||||
|
||||
const Image = ({
|
||||
imageName, type, width, height, ...otherProps
|
||||
}: Props) => {
|
||||
const data = useStaticQuery(graphql`
|
||||
query {
|
||||
logoSm: file(relativePath: { eq: "src/images/s.png" }) {
|
||||
childImageSharp {
|
||||
fixed(height: 30) {
|
||||
...GatsbyImageSharpFixed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logoLg: file(relativePath: { eq: "src/images/s.png" }) {
|
||||
childImageSharp {
|
||||
fixed(width: 150) {
|
||||
...GatsbyImageSharpFixed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
incubatorSm: file(relativePath: { eq: "src/images/incubator.png" }) {
|
||||
childImageSharp {
|
||||
fixed(width: 300) {
|
||||
...GatsbyImageSharpFixed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stackoverflow: file(
|
||||
relativePath: { eq: "src/images/stack_overflow.png" }
|
||||
) {
|
||||
childImageSharp {
|
||||
fixed(width: 60) {
|
||||
...GatsbyImageSharpFixed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
docker: file(relativePath: { eq: "src/images/docker.png" }) {
|
||||
childImageSharp {
|
||||
fixed(width: 100) {
|
||||
...GatsbyImageSharpFixed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
preset: file(relativePath: { eq: "src/images/preset.png" }) {
|
||||
childImageSharp {
|
||||
fixed(width: 100) {
|
||||
...GatsbyImageSharpFixed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getAllImages: allImageSharp {
|
||||
edges {
|
||||
node {
|
||||
fixed(height: 70) {
|
||||
...GatsbyImageSharpFixed
|
||||
originalName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
const filter = data.getAllImages.edges.filter(
|
||||
(n) => n.node.fixed.originalName === imageName,
|
||||
);
|
||||
const imgStyle = width && height ? { width, height } : {};
|
||||
|
||||
return type === 'db' ? (
|
||||
<Img fixed={filter[0]?.node?.fixed} style={imgStyle} imgStyle={imgStyle} />
|
||||
) : (
|
||||
<Img fixed={data[imageName]?.childImageSharp?.fixed} {...otherProps} />
|
||||
);
|
||||
};
|
||||
|
||||
export default Image;
|
|
@ -0,0 +1,123 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
$brandColor: #20A7C9;
|
||||
$bigPad: 60px;
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
body {
|
||||
background-color: transparent !important;
|
||||
margin: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.ant-layout {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.contentPage {
|
||||
padding-bottom: $bigPad;
|
||||
section {
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: $bigPad 0 0 0;
|
||||
font-size: 17px;
|
||||
&:first-of-type{
|
||||
padding: 40px;
|
||||
background-image: linear-gradient(120deg, lighten($brandColor, 45), lighten($brandColor, 15));
|
||||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
h1 {
|
||||
font-size: 48px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 32px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
.title{
|
||||
margin-top: $bigPad;
|
||||
}
|
||||
|
||||
.ant-card-body{
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
flex-wrap: wrap;
|
||||
.ant-card-grid-hoverable {
|
||||
cursor: pointer;
|
||||
}
|
||||
h4 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
a {
|
||||
color: #1985a0;
|
||||
}
|
||||
th, td {
|
||||
padding: 15px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
|
||||
background-color: $brandColor;
|
||||
}
|
||||
|
||||
.ant-menu-item-selected a {
|
||||
color: white;
|
||||
}
|
||||
.ant-menu-submenu-selected {
|
||||
color: $brandColor;
|
||||
}
|
||||
|
||||
.ant-menu-horizontal {
|
||||
& > .ant-menu-item:hover, & > .ant-menu-item-active {
|
||||
color: $brandColor !important;
|
||||
border-bottom: 2px solid $brandColor;
|
||||
}
|
||||
& >.ant-menu-item-selected {
|
||||
color: $brandColor;
|
||||
border-bottom: 2px solid $brandColor;
|
||||
a {
|
||||
color: $brandColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tr:nth-child(even) {background-color: #f2f2f2;}
|
||||
|
||||
.centered {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button {
|
||||
background: $brandColor;
|
||||
}
|
|
@ -0,0 +1,235 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import { Link } from 'gatsby';
|
||||
import {
|
||||
Layout, Menu, Button, Drawer,
|
||||
} from 'antd';
|
||||
import { css } from '@emotion/core';
|
||||
import { MenuOutlined } from '@ant-design/icons';
|
||||
|
||||
import logoSvg from '../images/superset-logo-horiz.svg';
|
||||
import Footer from './footer';
|
||||
import SEO from './seo';
|
||||
import AppMenu from './menu';
|
||||
|
||||
import { getCurrentPath } from '../utils';
|
||||
import 'antd/dist/antd.css';
|
||||
import './layout.scss';
|
||||
|
||||
const { Header, Sider } = Layout;
|
||||
|
||||
const leftPaneWidth = 350;
|
||||
const breakpoints = [576, 768, 992, 1200];
|
||||
|
||||
const mq = breakpoints.map((bp) => `@media (max-width: ${bp}px)`);
|
||||
|
||||
const layoutStyles = css`
|
||||
font-family: Inter;
|
||||
.ant-layout {
|
||||
background-color: white !important;
|
||||
}
|
||||
Button {
|
||||
background: #20a7c9;
|
||||
border-color: #20a7c9;
|
||||
border-radius: 4px;
|
||||
}
|
||||
`;
|
||||
|
||||
const headerStyle = css`
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.12);
|
||||
z-index: 1;
|
||||
.ant-menu {
|
||||
background: transparent;
|
||||
}
|
||||
.ant-menu-horizontal {
|
||||
border-bottom: none;
|
||||
}
|
||||
`;
|
||||
|
||||
const getStartedButtonStyle = css`
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 16px;
|
||||
`;
|
||||
|
||||
const centerLayoutStyle = css`
|
||||
padding: 25px;
|
||||
min-height: 60vw;
|
||||
overflow: auto;
|
||||
padding-right: 250px;
|
||||
.menu {
|
||||
display: none;
|
||||
${[mq[2]]} {
|
||||
display: block;
|
||||
}
|
||||
padding: 25px;
|
||||
}
|
||||
`;
|
||||
|
||||
const sidebarStyle = css`
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 64px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
border-right: 1px solid #bfbfbf;
|
||||
`;
|
||||
|
||||
const contentStyle = css`
|
||||
margin-top: 3px;
|
||||
background-color: white;
|
||||
h2 {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
h3 {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
img {
|
||||
max-width: 800px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
blockquote {
|
||||
color: rgb(132, 146, 166);
|
||||
padding: 10px 30px;
|
||||
margin: 30px 0px;
|
||||
border-radius: 3px;
|
||||
border-left: 4px solid rgb(56, 211, 236);
|
||||
background: rgb(239, 242, 247);
|
||||
}
|
||||
pre {
|
||||
border: solid #00000033 1px;
|
||||
padding: 5px;
|
||||
background-color: #82ef8217;
|
||||
border-radius: 3px;
|
||||
max-width: 1000px;
|
||||
}
|
||||
p {
|
||||
font-size: 16px;
|
||||
}
|
||||
ul {
|
||||
font-size: 16px;
|
||||
}
|
||||
`;
|
||||
|
||||
const contentLayoutDocsStyle = css`
|
||||
position: fixed;
|
||||
top: 64px;
|
||||
left: ${leftPaneWidth}px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
overflow: visible;
|
||||
${[mq[2]]} {
|
||||
top: 64px;
|
||||
left: 0;
|
||||
}
|
||||
aside {
|
||||
${[mq[2]]} {
|
||||
display: none;
|
||||
}
|
||||
overflow: auto;
|
||||
}
|
||||
`;
|
||||
|
||||
const logoStyle = css`
|
||||
float: left;
|
||||
margin-left: -50px;
|
||||
margin-top: 5px;
|
||||
heigh: 30px;
|
||||
`;
|
||||
interface Props {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const AppLayout = ({ children }: Props) => {
|
||||
const [showDrawer, setDrawer] = useState(false);
|
||||
const isOnDocsPage = getCurrentPath().indexOf('docs') > -1;
|
||||
return (
|
||||
<Layout css={layoutStyles}>
|
||||
<SEO title="Welcome" />
|
||||
<Header css={headerStyle}>
|
||||
<Link to="/">
|
||||
<img height="50" css={logoStyle} src={logoSvg} alt="logo" />
|
||||
</Link>
|
||||
<Menu mode="horizontal" selectedKeys={getCurrentPath()}>
|
||||
<Menu.Item key="docsintro">
|
||||
<Link to="/docs/intro">Documentation</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="community">
|
||||
<Link to="/community">Community</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="resources">
|
||||
<Link to="/resources"> Resources</Link>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
<div css={getStartedButtonStyle}>
|
||||
<Link to="/docs/intro">
|
||||
<Button type="primary" size="medium">
|
||||
Get Started
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</Header>
|
||||
{isOnDocsPage ? (
|
||||
<>
|
||||
<Drawer
|
||||
placement="left"
|
||||
closable={false}
|
||||
onClose={() => setDrawer(false)}
|
||||
visible={showDrawer}
|
||||
getContainer={false}
|
||||
style={{ position: 'absolute' }}
|
||||
>
|
||||
<AppMenu />
|
||||
</Drawer>
|
||||
<Layout css={contentLayoutDocsStyle}>
|
||||
{isOnDocsPage && (
|
||||
<Sider width={leftPaneWidth} css={sidebarStyle}>
|
||||
<AppMenu />
|
||||
</Sider>
|
||||
)}
|
||||
<Layout css={contentStyle}>
|
||||
<div css={centerLayoutStyle}>
|
||||
<MenuOutlined
|
||||
onClick={() => setDrawer(true)}
|
||||
className="menu"
|
||||
/>
|
||||
{children}
|
||||
</div>
|
||||
<Footer />
|
||||
</Layout>
|
||||
</Layout>
|
||||
</>
|
||||
) : (
|
||||
<Layout>
|
||||
{children}
|
||||
<Footer />
|
||||
</Layout>
|
||||
)}
|
||||
</Layout>
|
||||
);
|
||||
};
|
||||
|
||||
export default AppLayout;
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { useMenus, Link } from 'docz';
|
||||
import { Menu } from 'antd';
|
||||
import { getActiveMenuItem } from '../utils';
|
||||
|
||||
const { SubMenu } = Menu;
|
||||
|
||||
export default () => {
|
||||
const menus = useMenus();
|
||||
const { openKey, selectedKey } = getActiveMenuItem(menus);
|
||||
return (
|
||||
<Menu
|
||||
mode="inline"
|
||||
defaultOpenKeys={[openKey]}
|
||||
defaultSelectedKeys={[selectedKey]}
|
||||
>
|
||||
{menus.map((menuItem) => {
|
||||
if (menuItem.menu?.length > 0) {
|
||||
return (
|
||||
<SubMenu key={menuItem.id} title={menuItem.name}>
|
||||
{menuItem.menu
|
||||
.sort((a, b) => a.index - b.index)
|
||||
.map((submenuItem) => (
|
||||
<Menu.Item key={submenuItem.id}>
|
||||
<Link to={submenuItem.route}>{submenuItem.name}</Link>
|
||||
</Menu.Item>
|
||||
))}
|
||||
</SubMenu>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Menu.Item key={menuItem.id}>
|
||||
<Link to={menuItem.route}>{menuItem.name}</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
})}
|
||||
</Menu>
|
||||
);
|
||||
};
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { useMenus } from 'docz';
|
||||
import { getPreviousAndNextUrls } from '../utils';
|
||||
|
||||
const nextButtons = () => {
|
||||
const menus = useMenus();
|
||||
const [prevUrl, nextUrl] = getPreviousAndNextUrls(menus);
|
||||
return (
|
||||
<>
|
||||
{prevUrl && (
|
||||
<a href={prevUrl} className="ant-btn">
|
||||
Prev
|
||||
</a>
|
||||
)}
|
||||
{nextUrl && (
|
||||
<a href={nextUrl} className="ant-btn">
|
||||
Next
|
||||
</a>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default nextButtons;
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Select } from 'antd';
|
||||
import querystring from 'querystring';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const versions = ['1', '2'];
|
||||
|
||||
export default function VersionSelect() {
|
||||
const { version } = querystring.parse(window.location.search.substr(1));
|
||||
const handleChange = (e) => {
|
||||
// @ts-ignore
|
||||
window.location = `/docs/intro?version=${e}`;
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
version:
|
||||
<Select
|
||||
defaultValue={version || 1}
|
||||
style={{ width: 120 }}
|
||||
onChange={handleChange}
|
||||
>
|
||||
{versions.map((e) => (
|
||||
<Option value={e}>{e}</Option>
|
||||
))}
|
||||
</Select>
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { useStaticQuery, graphql } from 'gatsby';
|
||||
import favicon from '../images/favicon.png';
|
||||
|
||||
function SEO({
|
||||
description, lang, meta, title,
|
||||
}) {
|
||||
const { site } = useStaticQuery(
|
||||
graphql`
|
||||
query {
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
description
|
||||
author
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
);
|
||||
|
||||
const metaDescription = description || site.siteMetadata.description;
|
||||
|
||||
return (
|
||||
<Helmet
|
||||
htmlAttributes={{
|
||||
lang,
|
||||
}}
|
||||
title={title}
|
||||
titleTemplate={`%s | ${site.siteMetadata.title}`}
|
||||
meta={[
|
||||
{
|
||||
name: 'description',
|
||||
content: metaDescription,
|
||||
},
|
||||
{
|
||||
property: 'og:title',
|
||||
content: title,
|
||||
},
|
||||
{
|
||||
property: 'og:description',
|
||||
content: metaDescription,
|
||||
},
|
||||
{
|
||||
property: 'og:type',
|
||||
content: 'website',
|
||||
},
|
||||
{
|
||||
name: 'twitter:card',
|
||||
content: 'summary',
|
||||
},
|
||||
{
|
||||
name: 'twitter:creator',
|
||||
content: site.siteMetadata.author,
|
||||
},
|
||||
{
|
||||
name: 'twitter:title',
|
||||
content: title,
|
||||
},
|
||||
{
|
||||
name: 'twitter:description',
|
||||
content: metaDescription,
|
||||
},
|
||||
].concat(meta)}
|
||||
>
|
||||
<link rel="icon" href={favicon} />
|
||||
</Helmet>
|
||||
);
|
||||
}
|
||||
|
||||
SEO.defaultProps = {
|
||||
lang: 'en',
|
||||
meta: [],
|
||||
description: '',
|
||||
};
|
||||
|
||||
SEO.propTypes = {
|
||||
description: PropTypes.string,
|
||||
lang: PropTypes.string,
|
||||
meta: PropTypes.arrayOf(PropTypes.object),
|
||||
title: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default SEO;
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Anchor } from 'antd';
|
||||
import { useMenus } from 'docz';
|
||||
import { getActiveMenuItem } from '../utils';
|
||||
|
||||
const { Link } = Anchor;
|
||||
|
||||
const HeaderNav = () => {
|
||||
const menus = useMenus();
|
||||
const { headings } = getActiveMenuItem(menus);
|
||||
const headsList = headings.map((e) => (
|
||||
<Link href={`#${e.slug}`} title={e.value} />
|
||||
));
|
||||
return <Anchor>{headsList}</Anchor>;
|
||||
};
|
||||
|
||||
export default HeaderNav;
|
|
@ -0,0 +1,77 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { theme, useConfig } from 'docz';
|
||||
import { ThemeProvider } from 'theme-ui';
|
||||
import { css } from '@emotion/core';
|
||||
import SEO from '../components/seo';
|
||||
import Layout from '../components/layout';
|
||||
import HeaderNav from '../components/sidenav';
|
||||
import NextLinks from '../components/next';
|
||||
|
||||
import 'antd/dist/antd.css';
|
||||
|
||||
interface Props {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const docLayout = css`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.headerNav {
|
||||
position: fixed;
|
||||
top: 64px;
|
||||
right: 0;
|
||||
width: 250px;
|
||||
padding: 16px;
|
||||
height: 605px;
|
||||
overflow: auto;
|
||||
ul {
|
||||
font-size: 12px;
|
||||
li {
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const Theme = ({ children }: Props) => {
|
||||
const config = useConfig();
|
||||
return (
|
||||
<ThemeProvider theme={config}>
|
||||
<Layout>
|
||||
<SEO title="Documents" />
|
||||
<div css={docLayout}>
|
||||
<div>{children}</div>
|
||||
<div className="headerNav">
|
||||
<HeaderNav />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<NextLinks />
|
||||
</div>
|
||||
</Layout>
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
export default theme()(Theme);
|
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 442 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 626 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 163 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 29 KiB |
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 266 69" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<path d="M73.79,15.23C67.32,15.23 61.36,18.87 55.6,25.23C49.94,18.77 43.88,15.23 37.11,15.23C25.9,15.23 17.72,23.23 17.72,34C17.72,44.77 25.9,52.67 37.11,52.67C44,52.67 49.34,49.44 55.3,43C61.06,49.46 66.92,52.69 73.79,52.69C85,52.67 93.18,44.8 93.18,34C93.18,23.2 85,15.23 73.79,15.23ZM37.19,41.37C32.44,41.37 29.61,38.24 29.61,34.1C29.61,29.96 32.44,26.74 37.19,26.74C41.19,26.74 44.46,29.96 48,34.3C44.66,38.34 41.13,41.37 37.19,41.37ZM73.45,41.37C69.51,41.37 66.18,38.24 62.64,34.1C66.28,29.76 69.41,26.74 73.45,26.74C78.2,26.74 81,30 81,34.1C81,38.2 78.2,41.37 73.45,41.37Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M63.74,50L71.28,41C68.28,40.1 65.51,37.4 62.64,34.05L55.3,43C57.703,45.788 60.556,48.154 63.74,50Z" style="fill:rgb(32,167,201);fill-rule:nonzero;"/>
|
||||
<g id="Main">
|
||||
<g id="Superset">
|
||||
<g id="Full-Lockup-With-Text">
|
||||
<g id="Group-7">
|
||||
<g id="Group-17">
|
||||
<g id="Superset-Copy">
|
||||
<g>
|
||||
<path d="M116.72,40.39C116.751,39.474 116.36,38.592 115.66,38C114.539,37.193 113.272,36.609 111.93,36.28C109.421,35.66 107.048,34.582 104.93,33.1C103.37,31.922 102.481,30.053 102.55,28.1C102.528,26.015 103.555,24.052 105.28,22.88C107.327,21.458 109.79,20.754 112.28,20.88C114.812,20.767 117.301,21.577 119.28,23.16C120.994,24.509 121.961,26.601 121.88,28.78L121.88,28.88L116.82,28.88C116.861,27.778 116.419,26.71 115.61,25.96C114.667,25.171 113.457,24.773 112.23,24.85C111.077,24.779 109.934,25.104 108.99,25.77C108.263,26.344 107.842,27.224 107.85,28.15C107.867,28.99 108.298,29.769 109,30.23C110.313,31.008 111.726,31.603 113.2,32C115.582,32.553 117.81,33.633 119.72,35.16C121.197,36.462 122.013,38.362 121.94,40.33C122.008,42.418 121.013,44.404 119.3,45.6C117.238,46.985 114.78,47.662 112.3,47.53C109.663,47.589 107.072,46.823 104.89,45.34C102.838,43.996 101.66,41.648 101.81,39.2L101.81,39.09L107,39.09C106.889,40.389 107.42,41.664 108.42,42.5C109.597,43.291 111.004,43.671 112.42,43.58C113.571,43.658 114.716,43.348 115.67,42.7C116.371,42.144 116.762,41.283 116.72,40.39Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M137,44.4C136.453,45.359 135.672,46.164 134.73,46.74C132.116,48.188 128.835,47.72 126.73,45.6C125.583,44.267 125.01,42.24 125.01,39.52L125.01,27.85L130.21,27.85L130.21,39.58C130.131,40.629 130.379,41.678 130.92,42.58C131.434,43.208 132.22,43.551 133.03,43.5C133.767,43.516 134.498,43.38 135.18,43.1C135.764,42.836 136.268,42.422 136.64,41.9L136.64,27.85L141.86,27.85L141.86,47.18L137.41,47.18L137,44.4Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M162.87,38.05C162.99,40.508 162.286,42.937 160.87,44.95C159.569,46.68 157.492,47.658 155.33,47.56C154.4,47.575 153.478,47.384 152.63,47C151.843,46.61 151.158,46.042 150.63,45.34L150.63,54.62L145.43,54.62L145.43,27.85L150.13,27.85L150.44,30.13C150.968,29.331 151.673,28.664 152.5,28.18C153.363,27.707 154.336,27.469 155.32,27.49C157.535,27.403 159.644,28.467 160.89,30.3C162.313,32.49 163.013,35.072 162.89,37.68L162.87,38.05ZM157.65,37.65C157.71,36.118 157.397,34.595 156.74,33.21C156.228,32.144 155.132,31.476 153.95,31.51C153.253,31.49 152.562,31.656 151.95,31.99C151.393,32.322 150.937,32.799 150.63,33.37L150.63,41.86C150.942,42.394 151.4,42.828 151.95,43.11C152.573,43.411 153.259,43.558 153.95,43.54C155.082,43.61 156.161,43.032 156.73,42.05C157.376,40.819 157.684,39.439 157.62,38.05L157.65,37.65Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M174.21,47.56C171.699,47.674 169.258,46.696 167.52,44.88C165.828,43.026 164.93,40.579 165.02,38.07L165.02,37.36C164.918,34.784 165.761,32.258 167.39,30.26C170.696,26.757 176.29,26.572 179.82,29.85C181.338,31.617 182.119,33.903 182,36.23L182,39.07L170.43,39.07L170.43,39.18C170.48,40.34 170.933,41.447 171.71,42.31C172.51,43.146 173.634,43.595 174.79,43.54C175.762,43.562 176.732,43.444 177.67,43.19C178.539,42.91 179.377,42.542 180.17,42.09L181.58,45.32C180.656,46.037 179.609,46.579 178.49,46.92C177.108,47.366 175.662,47.582 174.21,47.56ZM173.74,31.56C172.841,31.53 171.983,31.946 171.45,32.67C170.859,33.531 170.513,34.537 170.45,35.58L170.5,35.67L176.9,35.67L176.9,35.21C176.949,34.261 176.674,33.322 176.12,32.55C175.546,31.835 174.655,31.446 173.74,31.51L173.74,31.56Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M195.3,32.33L193.38,32.33C192.711,32.303 192.047,32.47 191.47,32.81C190.964,33.141 190.567,33.614 190.33,34.17L190.33,47.18L185.13,47.18L185.13,27.85L190,27.85L190.23,30.71C190.616,29.787 191.224,28.972 192,28.34C192.71,27.776 193.594,27.476 194.5,27.49C194.741,27.488 194.982,27.508 195.22,27.55L195.89,27.7L195.3,32.33Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M208.32,41.86C208.308,41.257 207.996,40.698 207.49,40.37C206.544,39.809 205.498,39.435 204.41,39.27C202.553,38.979 200.785,38.271 199.24,37.2C198.087,36.32 197.433,34.93 197.49,33.48C197.487,31.814 198.265,30.24 199.59,29.23C201.198,28.003 203.19,27.386 205.21,27.49C207.312,27.38 209.391,27.991 211.1,29.22C212.489,30.234 213.279,31.882 213.2,33.6L213.2,33.71L208.2,33.71C208.226,33.002 207.958,32.314 207.46,31.81C206.859,31.287 206.074,31.024 205.28,31.08C204.561,31.04 203.85,31.26 203.28,31.7C202.816,32.075 202.55,32.644 202.56,33.24C202.551,33.826 202.837,34.379 203.32,34.71C204.271,35.243 205.318,35.582 206.4,35.71C208.308,35.991 210.126,36.71 211.71,37.81C212.862,38.729 213.506,40.148 213.44,41.62C213.458,43.325 212.62,44.93 211.21,45.89C209.473,47.062 207.403,47.641 205.31,47.54C203.1,47.652 200.925,46.939 199.21,45.54C197.817,44.508 196.996,42.873 197,41.14L197,41.04L201.77,41.04C201.72,41.907 202.093,42.746 202.77,43.29C203.515,43.784 204.397,44.029 205.29,43.99C206.067,44.039 206.838,43.835 207.49,43.41C208.012,43.069 208.326,42.484 208.32,41.86Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M224.86,47.56C222.352,47.674 219.914,46.696 218.18,44.88C216.488,43.026 215.59,40.579 215.68,38.07L215.68,37.36C215.579,34.786 216.419,32.261 218.04,30.26C221.346,26.757 226.94,26.572 230.47,29.85C231.992,31.615 232.77,33.903 232.64,36.23L232.64,39.07L221.09,39.07L221.09,39.18C221.137,40.339 221.587,41.446 222.36,42.31C223.162,43.149 224.291,43.598 225.45,43.54C226.419,43.562 227.385,43.444 228.32,43.19C229.193,42.912 230.034,42.544 230.83,42.09L232.24,45.32C231.315,46.035 230.268,46.577 229.15,46.92C227.765,47.366 226.315,47.582 224.86,47.56ZM224.4,31.56C223.5,31.526 222.641,31.943 222.11,32.67C221.519,33.532 221.174,34.537 221.11,35.58L221.17,35.67L227.57,35.67L227.57,35.21C227.619,34.261 227.344,33.322 226.79,32.55C226.214,31.832 225.318,31.442 224.4,31.51L224.4,31.56Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M242.35,23.11L242.35,27.85L245.61,27.85L245.61,31.51L242.35,31.51L242.35,41.36C242.296,41.937 242.465,42.513 242.82,42.97C243.15,43.299 243.604,43.474 244.07,43.45C244.304,43.451 244.538,43.435 244.77,43.4C245.003,43.363 245.233,43.313 245.46,43.25L245.91,47.02C245.408,47.195 244.893,47.332 244.37,47.43C243.834,47.516 243.293,47.56 242.75,47.56C241.219,47.662 239.712,47.126 238.59,46.08C237.508,44.765 236.984,43.077 237.13,41.38L237.13,31.51L234.31,31.51L234.31,27.85L237.13,27.85L237.13,23.11L242.35,23.11Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<path d="M55.6,25.22C53.213,22.392 50.378,19.973 47.21,18.06L39.66,27.16C42.53,28.16 45.07,30.74 47.77,34.03L48.07,34.24L55.6,25.22Z" style="fill:rgb(32,167,201);fill-rule:nonzero;"/>
|
||||
<path d="M130.22,21.43L127.44,21.43L126.9,23L125.3,23L128,15.7L129.63,15.7L132.35,23L130.74,23L130.22,21.43ZM127.83,20.28L129.83,20.28L128.83,17.41L127.83,20.28Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M138.29,20.44C138.327,21.136 138.11,21.822 137.68,22.37C137.051,23.065 136.051,23.297 135.18,22.95C134.939,22.844 134.727,22.683 134.56,22.48L134.56,25.08L133,25.08L133,17.58L134.43,17.58L134.52,18.22C134.682,17.988 134.899,17.8 135.15,17.67C135.416,17.536 135.712,17.471 136.01,17.48C136.667,17.446 137.3,17.738 137.7,18.26C138.13,18.862 138.345,19.591 138.31,20.33L138.29,20.44ZM136.7,20.33C136.721,19.896 136.624,19.464 136.42,19.08C136.254,18.769 135.922,18.582 135.57,18.6C135.358,18.595 135.149,18.644 134.96,18.74C134.792,18.829 134.654,18.965 134.56,19.13L134.56,21.51C134.659,21.661 134.798,21.782 134.96,21.86C135.155,21.945 135.367,21.986 135.58,21.98C135.918,22.006 136.245,21.844 136.43,21.56C136.627,21.217 136.721,20.825 136.7,20.43L136.7,20.33Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M142.72,23C142.667,22.88 142.617,22.75 142.57,22.61C142.529,22.473 142.502,22.332 142.49,22.19C142.323,22.452 142.102,22.673 141.84,22.84C141.544,23.034 141.194,23.129 140.84,23.11C140.326,23.143 139.817,22.986 139.41,22.67C139.07,22.367 138.886,21.925 138.91,21.47C138.893,20.972 139.146,20.501 139.57,20.24C140.164,19.908 140.841,19.755 141.52,19.8L142.41,19.8L142.41,19.37C142.421,19.146 142.342,18.926 142.19,18.76C142.006,18.605 141.77,18.526 141.53,18.54C141.315,18.526 141.102,18.59 140.93,18.72C140.786,18.836 140.708,19.016 140.72,19.2L139.19,19.2C139.175,18.718 139.424,18.265 139.84,18.02C140.371,17.666 141.002,17.491 141.64,17.52C142.248,17.491 142.849,17.663 143.35,18.01C143.79,18.341 144.038,18.87 144.01,19.42L144.01,21.66C144.007,21.899 144.031,22.137 144.08,22.37C144.119,22.6 144.182,22.824 144.27,23.04L142.72,23ZM141.27,22C141.533,22.006 141.792,21.941 142.02,21.81C142.21,21.714 142.364,21.56 142.46,21.37L142.46,20.6L141.57,20.6C141.292,20.581 141.017,20.666 140.8,20.84C140.635,20.979 140.54,21.184 140.54,21.4C140.537,21.569 140.61,21.731 140.74,21.84C140.892,21.955 141.08,22.011 141.27,22Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M147.73,22C147.977,22.01 148.22,21.928 148.41,21.77C148.579,21.618 148.671,21.397 148.66,21.17L150.11,21.17C150.127,21.709 149.876,22.223 149.44,22.54C148.949,22.921 148.341,23.119 147.72,23.1C146.975,23.139 146.247,22.859 145.72,22.33C145.223,21.786 144.963,21.066 145,20.33L145,20.18C144.965,19.446 145.22,18.727 145.71,18.18C146.761,17.225 148.354,17.141 149.5,17.98C149.939,18.35 150.177,18.907 150.14,19.48L148.69,19.48C148.7,19.223 148.61,18.972 148.44,18.78C148.263,18.589 148.01,18.487 147.75,18.5C147.39,18.467 147.041,18.647 146.86,18.96C146.674,19.317 146.584,19.717 146.6,20.12L146.6,20.27C146.583,20.673 146.673,21.073 146.86,21.43C147.02,21.767 147.357,21.988 147.73,22Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M152.58,18.26C152.958,17.76 153.549,17.465 154.176,17.465C154.701,17.465 155.206,17.672 155.58,18.04C155.973,18.53 156.163,19.154 156.11,19.78L156.11,23L154.52,23L154.52,19.77C154.553,19.451 154.468,19.13 154.28,18.87C154.092,18.678 153.828,18.579 153.56,18.6C153.361,18.598 153.164,18.635 152.98,18.71C152.82,18.778 152.679,18.885 152.57,19.02L152.57,23.02L151,23.02L151,15.18L152.59,15.18L152.58,18.26Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M159.92,23.11C159.179,23.132 158.459,22.859 157.92,22.35C157.41,21.848 157.134,21.155 157.16,20.44L157.16,20.24C157.131,19.505 157.389,18.788 157.88,18.24C158.377,17.71 159.085,17.428 159.81,17.47C160.491,17.427 161.16,17.666 161.66,18.13C162.116,18.611 162.354,19.258 162.32,19.92L162.32,20.71L158.81,20.71C158.82,21.041 158.956,21.356 159.19,21.59C159.443,21.83 159.782,21.956 160.13,21.94C160.426,21.944 160.722,21.91 161.01,21.84C161.272,21.76 161.527,21.656 161.77,21.53L162.2,22.44C161.915,22.644 161.597,22.796 161.26,22.89C160.827,23.032 160.375,23.107 159.92,23.11ZM159.78,18.6C159.513,18.592 159.257,18.711 159.09,18.92C158.907,19.153 158.795,19.435 158.77,19.73L160.77,19.73L160.77,19.6C160.783,19.329 160.697,19.063 160.53,18.85C160.331,18.658 160.055,18.566 159.78,18.6Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M248.77,23.62L247.92,23.62L247.92,26.28L247.37,26.28L247.37,23.62L246.52,23.62L246.52,23.14L248.77,23.14L248.77,23.62ZM251.93,24.27L251.05,26.27L250.75,26.27L249.84,24.17L249.84,26.26L249.3,26.26L249.3,23.14L249.98,23.14L250.92,25.42L251.92,23.14L252.57,23.14L252.57,26.28L252.02,26.28L251.93,24.27Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
</svg>
|
After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 266 69" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<path d="M73.79,15.23C67.32,15.23 61.36,18.87 55.6,25.23C49.94,18.77 43.88,15.23 37.11,15.23C25.9,15.23 17.72,23.23 17.72,34C17.72,44.77 25.9,52.67 37.11,52.67C44,52.67 49.34,49.44 55.3,43C61.06,49.46 66.92,52.69 73.79,52.69C85,52.67 93.18,44.8 93.18,34C93.18,23.2 85,15.23 73.79,15.23ZM37.19,41.37C32.44,41.37 29.61,38.24 29.61,34.1C29.61,29.96 32.44,26.74 37.19,26.74C41.19,26.74 44.46,29.96 48,34.3C44.66,38.34 41.13,41.37 37.19,41.37ZM73.45,41.37C69.51,41.37 66.18,38.24 62.64,34.1C66.28,29.76 69.41,26.74 73.45,26.74C78.2,26.74 81,30 81,34.1C81,38.2 78.2,41.37 73.45,41.37Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M63.74,50L71.28,41C68.28,40.1 65.51,37.4 62.64,34.05L55.3,43C57.703,45.788 60.556,48.154 63.74,50Z" style="fill:rgb(32,167,201);fill-rule:nonzero;"/>
|
||||
<g id="Main">
|
||||
<g id="Superset">
|
||||
<g id="Full-Lockup-With-Text">
|
||||
<g id="Group-7">
|
||||
<g id="Group-17">
|
||||
<g id="Superset-Copy">
|
||||
<g>
|
||||
<path d="M116.72,40.39C116.751,39.474 116.36,38.592 115.66,38C114.539,37.193 113.272,36.609 111.93,36.28C109.421,35.66 107.048,34.582 104.93,33.1C103.37,31.922 102.481,30.053 102.55,28.1C102.528,26.015 103.555,24.052 105.28,22.88C107.327,21.458 109.79,20.754 112.28,20.88C114.812,20.767 117.301,21.577 119.28,23.16C120.994,24.509 121.961,26.601 121.88,28.78L121.88,28.88L116.82,28.88C116.861,27.778 116.419,26.71 115.61,25.96C114.667,25.171 113.457,24.773 112.23,24.85C111.077,24.779 109.934,25.104 108.99,25.77C108.263,26.344 107.842,27.224 107.85,28.15C107.867,28.99 108.298,29.769 109,30.23C110.313,31.008 111.726,31.603 113.2,32C115.582,32.553 117.81,33.633 119.72,35.16C121.197,36.462 122.013,38.362 121.94,40.33C122.008,42.418 121.013,44.404 119.3,45.6C117.238,46.985 114.78,47.662 112.3,47.53C109.663,47.589 107.072,46.823 104.89,45.34C102.838,43.996 101.66,41.648 101.81,39.2L101.81,39.09L107,39.09C106.889,40.389 107.42,41.664 108.42,42.5C109.597,43.291 111.004,43.671 112.42,43.58C113.571,43.658 114.716,43.348 115.67,42.7C116.371,42.144 116.762,41.283 116.72,40.39Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M137,44.4C136.453,45.359 135.672,46.164 134.73,46.74C132.116,48.188 128.835,47.72 126.73,45.6C125.583,44.267 125.01,42.24 125.01,39.52L125.01,27.85L130.21,27.85L130.21,39.58C130.131,40.629 130.379,41.678 130.92,42.58C131.434,43.208 132.22,43.551 133.03,43.5C133.767,43.516 134.498,43.38 135.18,43.1C135.764,42.836 136.268,42.422 136.64,41.9L136.64,27.85L141.86,27.85L141.86,47.18L137.41,47.18L137,44.4Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M162.87,38.05C162.99,40.508 162.286,42.937 160.87,44.95C159.569,46.68 157.492,47.658 155.33,47.56C154.4,47.575 153.478,47.384 152.63,47C151.843,46.61 151.158,46.042 150.63,45.34L150.63,54.62L145.43,54.62L145.43,27.85L150.13,27.85L150.44,30.13C150.968,29.331 151.673,28.664 152.5,28.18C153.363,27.707 154.336,27.469 155.32,27.49C157.535,27.403 159.644,28.467 160.89,30.3C162.313,32.49 163.013,35.072 162.89,37.68L162.87,38.05ZM157.65,37.65C157.71,36.118 157.397,34.595 156.74,33.21C156.228,32.144 155.132,31.476 153.95,31.51C153.253,31.49 152.562,31.656 151.95,31.99C151.393,32.322 150.937,32.799 150.63,33.37L150.63,41.86C150.942,42.394 151.4,42.828 151.95,43.11C152.573,43.411 153.259,43.558 153.95,43.54C155.082,43.61 156.161,43.032 156.73,42.05C157.376,40.819 157.684,39.439 157.62,38.05L157.65,37.65Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M174.21,47.56C171.699,47.674 169.258,46.696 167.52,44.88C165.828,43.026 164.93,40.579 165.02,38.07L165.02,37.36C164.918,34.784 165.761,32.258 167.39,30.26C170.696,26.757 176.29,26.572 179.82,29.85C181.338,31.617 182.119,33.903 182,36.23L182,39.07L170.43,39.07L170.43,39.18C170.48,40.34 170.933,41.447 171.71,42.31C172.51,43.146 173.634,43.595 174.79,43.54C175.762,43.562 176.732,43.444 177.67,43.19C178.539,42.91 179.377,42.542 180.17,42.09L181.58,45.32C180.656,46.037 179.609,46.579 178.49,46.92C177.108,47.366 175.662,47.582 174.21,47.56ZM173.74,31.56C172.841,31.53 171.983,31.946 171.45,32.67C170.859,33.531 170.513,34.537 170.45,35.58L170.5,35.67L176.9,35.67L176.9,35.21C176.949,34.261 176.674,33.322 176.12,32.55C175.546,31.835 174.655,31.446 173.74,31.51L173.74,31.56Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M195.3,32.33L193.38,32.33C192.711,32.303 192.047,32.47 191.47,32.81C190.964,33.141 190.567,33.614 190.33,34.17L190.33,47.18L185.13,47.18L185.13,27.85L190,27.85L190.23,30.71C190.616,29.787 191.224,28.972 192,28.34C192.71,27.776 193.594,27.476 194.5,27.49C194.741,27.488 194.982,27.508 195.22,27.55L195.89,27.7L195.3,32.33Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M208.32,41.86C208.308,41.257 207.996,40.698 207.49,40.37C206.544,39.809 205.498,39.435 204.41,39.27C202.553,38.979 200.785,38.271 199.24,37.2C198.087,36.32 197.433,34.93 197.49,33.48C197.487,31.814 198.265,30.24 199.59,29.23C201.198,28.003 203.19,27.386 205.21,27.49C207.312,27.38 209.391,27.991 211.1,29.22C212.489,30.234 213.279,31.882 213.2,33.6L213.2,33.71L208.2,33.71C208.226,33.002 207.958,32.314 207.46,31.81C206.859,31.287 206.074,31.024 205.28,31.08C204.561,31.04 203.85,31.26 203.28,31.7C202.816,32.075 202.55,32.644 202.56,33.24C202.551,33.826 202.837,34.379 203.32,34.71C204.271,35.243 205.318,35.582 206.4,35.71C208.308,35.991 210.126,36.71 211.71,37.81C212.862,38.729 213.506,40.148 213.44,41.62C213.458,43.325 212.62,44.93 211.21,45.89C209.473,47.062 207.403,47.641 205.31,47.54C203.1,47.652 200.925,46.939 199.21,45.54C197.817,44.508 196.996,42.873 197,41.14L197,41.04L201.77,41.04C201.72,41.907 202.093,42.746 202.77,43.29C203.515,43.784 204.397,44.029 205.29,43.99C206.067,44.039 206.838,43.835 207.49,43.41C208.012,43.069 208.326,42.484 208.32,41.86Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M224.86,47.56C222.352,47.674 219.914,46.696 218.18,44.88C216.488,43.026 215.59,40.579 215.68,38.07L215.68,37.36C215.579,34.786 216.419,32.261 218.04,30.26C221.346,26.757 226.94,26.572 230.47,29.85C231.992,31.615 232.77,33.903 232.64,36.23L232.64,39.07L221.09,39.07L221.09,39.18C221.137,40.339 221.587,41.446 222.36,42.31C223.162,43.149 224.291,43.598 225.45,43.54C226.419,43.562 227.385,43.444 228.32,43.19C229.193,42.912 230.034,42.544 230.83,42.09L232.24,45.32C231.315,46.035 230.268,46.577 229.15,46.92C227.765,47.366 226.315,47.582 224.86,47.56ZM224.4,31.56C223.5,31.526 222.641,31.943 222.11,32.67C221.519,33.532 221.174,34.537 221.11,35.58L221.17,35.67L227.57,35.67L227.57,35.21C227.619,34.261 227.344,33.322 226.79,32.55C226.214,31.832 225.318,31.442 224.4,31.51L224.4,31.56Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
<path d="M242.35,23.11L242.35,27.85L245.61,27.85L245.61,31.51L242.35,31.51L242.35,41.36C242.296,41.937 242.465,42.513 242.82,42.97C243.15,43.299 243.604,43.474 244.07,43.45C244.304,43.451 244.538,43.435 244.77,43.4C245.003,43.363 245.233,43.313 245.46,43.25L245.91,47.02C245.408,47.195 244.893,47.332 244.37,47.43C243.834,47.516 243.293,47.56 242.75,47.56C241.219,47.662 239.712,47.126 238.59,46.08C237.508,44.765 236.984,43.077 237.13,41.38L237.13,31.51L234.31,31.51L234.31,27.85L237.13,27.85L237.13,23.11L242.35,23.11Z" style="fill:rgb(72,72,72);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<path d="M55.6,25.22C53.213,22.392 50.378,19.973 47.21,18.06L39.66,27.16C42.53,28.16 45.07,30.74 47.77,34.03L48.07,34.24L55.6,25.22Z" style="fill:rgb(32,167,201);fill-rule:nonzero;"/>
|
||||
</svg>
|
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
|
||||
import Layout from '../components/layout.tsx';
|
||||
import SEO from '../components/seo';
|
||||
|
||||
const NotFoundPage = () => (
|
||||
<Layout>
|
||||
<SEO title="404: Not found" />
|
||||
<h1>NOT FOUND</h1>
|
||||
<p>You just hit a route that does not exist... the sadness.</p>
|
||||
</Layout>
|
||||
);
|
||||
|
||||
export default NotFoundPage;
|
|
@ -0,0 +1,143 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { css } from '@emotion/core';
|
||||
import { Card, List } from 'antd';
|
||||
import { GithubOutlined } from '@ant-design/icons';
|
||||
import SEO from '../components/seo';
|
||||
import Layout from '../components/layout';
|
||||
import { pmc } from '../resources/data';
|
||||
|
||||
const { Meta } = Card;
|
||||
|
||||
const links = [
|
||||
[
|
||||
'https://apache-superset.slack.com/join/shared_invite/zt-g8lpruog-HeqpgYrwdfrD5OYhlU7hPQ#/',
|
||||
'Slack',
|
||||
'interact with other Superset users and community members',
|
||||
],
|
||||
[
|
||||
'https://github.com/apache/incubator-superset',
|
||||
'GitHub',
|
||||
'create tickets to report issues, report bugs, and suggest new features',
|
||||
],
|
||||
[
|
||||
'https://lists.apache.org/list.html?dev@superset.apache.org',
|
||||
'dev@ Mailing List',
|
||||
'participate in conversations with committers and contributors',
|
||||
],
|
||||
[
|
||||
'https://stackoverflow.com/questions/tagged/superset+apache-superset',
|
||||
'Stack Overflow',
|
||||
'our growing knowledge base',
|
||||
],
|
||||
[
|
||||
'https://www.meetup.com/Global-Apache-Superset-Community-Meetup/',
|
||||
'Superset Meetup Group',
|
||||
'join our monthly virtual meetups and register for any upcoming events',
|
||||
],
|
||||
[
|
||||
'https://github.com/apache/incubator-superset/blob/master/INTHEWILD.md',
|
||||
'Organizations',
|
||||
'a list of some of the organizations using Superset in production',
|
||||
],
|
||||
[
|
||||
'https://github.com/apache-superset/awesome-apache-superset',
|
||||
'Contributors Guide',
|
||||
'Interested in contributing? Learn how to contribute and best practices',
|
||||
],
|
||||
];
|
||||
|
||||
const communityContainer = css`
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
margin: 0 auto;
|
||||
overflow: auto;
|
||||
.communityCard {
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
margin: 10px 10px;
|
||||
.ant-card-meta-title {
|
||||
text-overflow: clip;
|
||||
white-space: normal;
|
||||
}
|
||||
.ant-card-body {
|
||||
padding: 8px;
|
||||
display:inline-block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const getInvolvedContainer = css`
|
||||
margin-bottom: 25px;
|
||||
`;
|
||||
|
||||
const Community = () => {
|
||||
const pmcList = pmc.map((e) => {
|
||||
const name = e.name.indexOf(' ');
|
||||
return (
|
||||
<a href={e.github} target="_blank" rel="noreferrer" key={name}>
|
||||
<Card
|
||||
className="communityCard"
|
||||
hoverable
|
||||
style={{ width: '150px' }}
|
||||
size="small"
|
||||
cover={<img alt="example" src={e.image} />}
|
||||
>
|
||||
<GithubOutlined style={{ paddingRight: 3, paddingTop: 3}} />
|
||||
{e.name}
|
||||
</Card>
|
||||
</a>
|
||||
);
|
||||
});
|
||||
return (
|
||||
<Layout>
|
||||
<div className="contentPage">
|
||||
<SEO title="Community" />
|
||||
<section>
|
||||
<h1 className="title">Community</h1>
|
||||
Get involved in our welcoming, fast growing community!
|
||||
</section>
|
||||
<section className="joinCommunity">
|
||||
<div css={getInvolvedContainer}>
|
||||
<h2>Get involved!</h2>
|
||||
<List
|
||||
size="small"
|
||||
bordered
|
||||
dataSource={links}
|
||||
renderItem={([href, link, post]) => (
|
||||
<List.Item>
|
||||
<a href={href}>{link}</a> - {post}
|
||||
</List.Item>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
<section className="ppmc">
|
||||
<h2>Apache Committers</h2>
|
||||
<div css={communityContainer}>{pmcList}</div>
|
||||
</section>
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Community;
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
name: Amazon Athena
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/athena
|
||||
index: 2
|
||||
version: 1
|
||||
---
|
||||
|
||||
## AWS Athena
|
||||
|
||||
### PyAthenaJDBC
|
||||
|
||||
[PyAthenaJDBC](https://pypi.org/project/PyAthenaJDBC/) is a Python DB 2.0 compliant wrapper for the
|
||||
[Amnazon Athena JDBC driver](https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html).
|
||||
|
||||
The connection string for Amazon Athena is as follows:
|
||||
|
||||
```
|
||||
awsathena+jdbc://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&...
|
||||
```
|
||||
|
||||
Note that you'll need to escape & encode when forming the connection string like so:
|
||||
|
||||
```
|
||||
s3://... -> s3%3A//...
|
||||
```
|
||||
|
||||
### PyAthena
|
||||
|
||||
You can also use [PyAthena library](https://pypi.org/project/PyAthena/) (no Java required) with the
|
||||
following connection string:
|
||||
|
||||
```
|
||||
awsathena+rest://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Clickhouse
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/clickhouse
|
||||
index: 12
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Clickhouse
|
||||
|
||||
The recommended connector library for Clickhouse is
|
||||
[sqlalchemy-clickhouse](https://github.com/cloudflare/sqlalchemy-clickhouse).
|
||||
|
||||
The expected connection string is formatted as follows:
|
||||
|
||||
```
|
||||
clickhouse://{username}:{password}@{hostname}:{port}/{database}
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: CockroachDB
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/cockroachdb
|
||||
index: 13
|
||||
version: 1
|
||||
---
|
||||
|
||||
## CockroachDB
|
||||
|
||||
The recommended connector library for CockroachDB is
|
||||
[sqlalchemy-cockroachdb](https://github.com/cockroachdb/sqlalchemy-cockroachdb).
|
||||
|
||||
The expected connection string is formatted as follows:
|
||||
|
||||
```
|
||||
cockroachdb://root@{hostname}:{port}/{database}?sslmode=disable
|
||||
```
|
|
@ -0,0 +1,86 @@
|
|||
---
|
||||
name: New Drivers to Docker Image
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/dockeradddrivers
|
||||
index: 1
|
||||
version: 1
|
||||
---
|
||||
## Install New Database Drivers in Docker Image
|
||||
|
||||
Superset requires a Python database driver to be installed for each additional type of database you
|
||||
want to connect to. When setting up Superset locally via `docker-compose`, the drivers and packages
|
||||
contained in
|
||||
[requirements.txt](https://github.com/apache/incubator-superset/blob/master/requirements.txt) and
|
||||
[requirements-dev.txt](https://github.com/apache/incubator-superset/blob/master/requirements-dev.txt)
|
||||
will be installed automatically.
|
||||
|
||||
In this section, we'll walk through how to install the MySQL connector library. The connector
|
||||
library installation process is the same for all additional libraries and we'll end this section
|
||||
with the recommended connector library for each database.
|
||||
|
||||
### 1. Determine the driver you need
|
||||
|
||||
To figure out how to install the [database driver](/docs/databases/installing-database-drivers) of your choice.
|
||||
|
||||
In the example, we'll walk through the process of installing a MySQL driver in Superset.
|
||||
|
||||
### 2. Install MySQL Driver
|
||||
|
||||
As we are currently running inside of a Docker container via `docker compose`, we cannot simply run
|
||||
`pip install mysqlclient` on our local shell and expect the drivers to be installed within the
|
||||
Docker containers for superset.
|
||||
|
||||
In order to address this, the Superset `docker compose` setup comes with a mechanism for you to
|
||||
install packages locally, which will be ignored by Git for the purposes of local development. Please
|
||||
follow these steps:
|
||||
|
||||
Create `requirements-local.txt`
|
||||
|
||||
```
|
||||
# From the repo root...
|
||||
touch ./docker/requirements-local.txt
|
||||
```
|
||||
|
||||
Add the driver selected in step above:
|
||||
|
||||
```
|
||||
echo "mysqlclient" >> ./docker/requirements-local.txt
|
||||
```
|
||||
|
||||
Rebuild your local image with the new driver baked in:
|
||||
|
||||
```
|
||||
docker-compose build --force-rm
|
||||
```
|
||||
|
||||
After the rebuild is complete, which make take a few minutes, relaunch:
|
||||
|
||||
```
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
### 3. Connect to MySQL
|
||||
|
||||
Now that you've got a MySQL driver installed locally, you should be able to test it out.
|
||||
|
||||
We can now create a Datasource in Superset that can be used to connect to a MySQL instance. Assuming
|
||||
your MySQL instance is running locally and can be accessed via localhost, use the following
|
||||
connection string in “SQL Alchemy URI”, by going to Sources > Databases > + icon (to add a new
|
||||
datasource) in Superset.
|
||||
|
||||
For Docker running in Linux:
|
||||
|
||||
```
|
||||
mysql://mysqluser:mysqluserpassword@localhost/example?charset=utf8
|
||||
```
|
||||
|
||||
For Docker running in OSX:
|
||||
|
||||
```
|
||||
mysql://mysqluser:mysqluserpassword@docker.for.mac.host.internal/example?charset=utf8
|
||||
```
|
||||
|
||||
Then click “Test Connection”, which should give you an “OK” message. If not, please look at your
|
||||
terminal for error messages, and reach out for help.
|
||||
|
||||
You can repeat this process for every database you want superset to be able to connect to.
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
name: Dremio
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/dremio
|
||||
index: 14
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Dremio
|
||||
|
||||
The recommended connector library for Dremio is
|
||||
[sqlalchemy_dremio](https://github.com/sqggles/sqlalchemy_dremio).
|
||||
|
||||
The expected connection string is formatted as follows:
|
||||
|
||||
```
|
||||
dremio://{username}:{password}@{host}:{port}/dremio
|
||||
```
|
||||
|
||||
This [blog post by Dremio](https://www.dremio.com/tutorials/dremio-apache-superset/) has some
|
||||
additional helpful instructions on connecting Superset to Dremio.
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
name: Apache Drill
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/drill
|
||||
index: 4
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Apache Drill
|
||||
|
||||
### SQLAlchemy
|
||||
|
||||
The recommended way to connect to Apache Drill is through SQLAlchemy. You can use the
|
||||
[sqlalchemy-drill](https://github.com/JohnOmernik/sqlalchemy-drill) package.
|
||||
|
||||
Once that is done, you can connect to Drill in two ways, either via the REST interface or by JDBC.
|
||||
If you are connecting via JDBC, you must have the Drill JDBC Driver installed.
|
||||
|
||||
The basic connection string for Drill looks like this:
|
||||
|
||||
```
|
||||
drill+sadrill://<username>:<password>@<host>:<port>/<storage_plugin>?use_ssl=True
|
||||
```
|
||||
|
||||
To connect to Drill running on a local machine running in embedded mode you can use the following
|
||||
connection string:
|
||||
|
||||
```
|
||||
drill+sadrill://localhost:8047/dfs?use_ssl=False
|
||||
```
|
||||
|
||||
### JDBC
|
||||
|
||||
Connecting to Drill through JDBC is more complicated and we recommend following
|
||||
[this tutorial](https://drill.apache.org/docs/using-the-jdbc-driver/).
|
||||
|
||||
The connection string looks like:
|
||||
|
||||
```
|
||||
drill+jdbc://<username>:<passsword>@<host>:<port>
|
||||
```
|
||||
|
||||
### ODBC
|
||||
|
||||
We recommend reading the
|
||||
[Apache Drill documentation](https://drill.apache.org/docs/installing-the-driver-on-linux/) and read
|
||||
the [Github README](https://github.com/JohnOmernik/sqlalchemy-drill#usage-with-odbc) to learn how to
|
||||
work with Drill through ODBC.
|
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
name: Apache Druid
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/druid
|
||||
index: 5
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Apache Druid
|
||||
|
||||
A native connector to Druid ships with Superset (behind the `DRUID_IS_ACTIVE` flag) but this is
|
||||
slowly getting deprecated in favor of SQLAlchemy / DBAPI connector made available in the
|
||||
[pydruid library](https://pythonhosted.org/pydruid/).
|
||||
|
||||
The connection string looks like:
|
||||
|
||||
```
|
||||
druid://<User>:<password>@<Host>:<Port-default-9088>/druid/v2/sql
|
||||
```
|
||||
|
||||
### Customizing Druid Connection
|
||||
|
||||
When adding a connection to Druid, you can customize the connection a few different ways in the
|
||||
**Add Database** form.
|
||||
|
||||
**Custom Certificate**
|
||||
|
||||
You can add certificates in the **Root Certificate** field when configuring the new database
|
||||
connection to Druid:
|
||||
|
||||
<img src="/images/root-cert-example.png" />{' '}
|
||||
|
||||
When using a custom certificate, pydruid will automatically use https scheme.
|
||||
|
||||
**Disable SSL Verification**
|
||||
|
||||
To disable SSL verification, add the following to the **Extras** field:
|
||||
|
||||
```
|
||||
engine_params:
|
||||
{"connect_args":
|
||||
{"scheme": "https", "ssl_verify_cert": false}}
|
||||
```
|
||||
|
||||
### Aggregations
|
||||
|
||||
Common aggregations or Druid metrics can be defined and used in Superset. The first and simpler use
|
||||
case is to use the checkbox matrix exposed in your datasource’s edit view (**Sources -> Druid
|
||||
Datasources -> [your datasource] -> Edit -> [tab] List Druid Column**).
|
||||
|
||||
Clicking the GroupBy and Filterable checkboxes will make the column appear in the related dropdowns
|
||||
while in the Explore view. Checking Count Distinct, Min, Max or Sum will result in creating new
|
||||
metrics that will appear in the **List Druid Metric** tab upon saving the datasource.
|
||||
|
||||
By editing these metrics, you’ll notice that their JSON element corresponds to Druid aggregation
|
||||
definition. You can create your own aggregations manually from the **List Druid Metric** tab
|
||||
following Druid documentation.
|
||||
|
||||
### Post-Aggregations
|
||||
|
||||
Druid supports post aggregation and this works in Superset. All you have to do is create a metric,
|
||||
much like you would create an aggregation manually, but specify `postagg` as a `Metric Type`. You
|
||||
then have to provide a valid json post-aggregation definition (as specified in the Druid docs) in
|
||||
the JSON field.
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
name: Elasticsearch
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/elasticsearch
|
||||
index: 15
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Elasticsearch
|
||||
|
||||
The recommended connector library for Elasticsearch is
|
||||
[elasticsearch-dbapi](https://github.com/preset-io/elasticsearch-dbapi).
|
||||
|
||||
The connection string for Elasticsearch looks like this:
|
||||
|
||||
```
|
||||
elasticsearch+http://{user}:{password}@{host}:9200/
|
||||
```
|
||||
|
||||
**Using HTTPS**
|
||||
|
||||
```
|
||||
elasticsearch+https://{user}:{password}@{host}:9200/
|
||||
```
|
||||
|
||||
Elasticsearch as a default limit of 10000 rows, so you can increase this limit on your cluster or
|
||||
set Superset’s row limit on config
|
||||
|
||||
```
|
||||
ROW_LIMIT = 10000
|
||||
```
|
||||
|
||||
You can query multiple indices on SQL Lab for example
|
||||
|
||||
```
|
||||
SELECT timestamp, agent FROM "logstash"
|
||||
```
|
||||
|
||||
But, to use visualizations for multiple indices you need to create an alias index on your cluster
|
||||
|
||||
```
|
||||
POST /_aliases
|
||||
{
|
||||
"actions" : [
|
||||
{ "add" : { "index" : "logstash-**", "alias" : "logstash_all" } }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Then register your table with the alias name logstasg_all
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Exasol
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/exasol
|
||||
index: 16
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Exasol
|
||||
|
||||
The recommended connector library for Exasol is
|
||||
[sqlalchemy-exasol](https://github.com/exasol/sqlalchemy-exasol).
|
||||
|
||||
The connection string for Exasol looks like this:
|
||||
|
||||
```
|
||||
exa+pyodbc://{username}:{password}@{hostname}:{port}/my_schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC
|
||||
```
|
|
@ -0,0 +1,70 @@
|
|||
---
|
||||
name: Extra Database Settings
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/extra-settings
|
||||
index: 40
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Extra Database Settings
|
||||
|
||||
### Deeper SQLAlchemy Integration
|
||||
|
||||
It is possible to tweak the database connection information using the parameters exposed by
|
||||
SQLAlchemy. In the **Database edit** view, you can edit the **Extra** field as a JSON blob.
|
||||
|
||||
This JSON string contains extra configuration elements. The `engine_params` object gets unpacked
|
||||
into the `sqlalchemy.create_engine` call, while the `metadata_params` get unpacked into the
|
||||
`sqlalchemy.MetaData` call. Refer to the SQLAlchemy docs for more information.
|
||||
|
||||
### Schemas
|
||||
|
||||
Databases like Postgres and Redshift use the **schema** as the logical entity on top of the
|
||||
**database**. For Superset to connect to a specific schema, you can set the **schema** parameter in
|
||||
the **Edit Tables** form (Sources > Tables > Edit record).
|
||||
|
||||
### External Password Store for SQLAlchemy Connections
|
||||
|
||||
Superset can be configured to use an external store for database passwords. This is useful if you a
|
||||
running a custom secret distribution framework and do not wish to store secrets in Superset’s meta
|
||||
database.
|
||||
|
||||
Example: Write a function that takes a single argument of type `sqla.engine.url` and returns the
|
||||
password for the given connection string. Then set `SQLALCHEMY_CUSTOM_PASSWORD_STORE` in your config
|
||||
file to point to that function.
|
||||
|
||||
```python
|
||||
def example_lookup_password(url):
|
||||
secret = <<get password from external framework>>
|
||||
return 'secret'
|
||||
|
||||
SQLALCHEMY_CUSTOM_PASSWORD_STORE = example_lookup_password
|
||||
```
|
||||
|
||||
A common pattern is to use environment variables to make secrets available.
|
||||
`SQLALCHEMY_CUSTOM_PASSWORD_STORE` can also be used for that purpose.
|
||||
|
||||
```python
|
||||
def example_password_as_env_var(url):
|
||||
# assuming the uri looks like
|
||||
# mysql://localhost?superset_user:{SUPERSET_PASSWORD}
|
||||
return url.password.format(os.environ)
|
||||
|
||||
SQLALCHEMY_CUSTOM_PASSWORD_STORE = example_password_as_env_var
|
||||
```
|
||||
|
||||
### SSL Access to Databases
|
||||
|
||||
You can use the `Extra` field in the **Edit Databases** form to configure SSL:
|
||||
|
||||
```JSON
|
||||
{
|
||||
"metadata_params": {},
|
||||
"engine_params": {
|
||||
"connect_args":{
|
||||
"sslmode":"require",
|
||||
"sslrootcert": "/path/to/my/pem"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
name: Google BigQuery
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/bigquery
|
||||
index: 16
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Google BigQuery
|
||||
|
||||
The recommended connector library for BigQuery is
|
||||
[pybigquery](https://github.com/mxmzdlv/pybigquery).
|
||||
|
||||
The connection string for BigQuery looks like:
|
||||
|
||||
```
|
||||
bigquery://{project_id}
|
||||
```
|
||||
|
||||
When adding a new BigQuery connection in Superset, you'll also need to add the GCP Service Account
|
||||
credentials file (as a JSON).
|
||||
|
||||
1. Create your Service Account via the Google Cloud Platform control panel, provide it access to the
|
||||
appropriate BigQuery datasets, and download the JSON configuration file for the service account.
|
||||
|
||||
2. n Superset, Add a JSON blob to the **Secure Extra** field in the database configuration form with
|
||||
the following format:
|
||||
|
||||
```
|
||||
{
|
||||
"credentials_info": <contents of credentials JSON file>
|
||||
}
|
||||
```
|
||||
|
||||
The resulting file should have this structure:
|
||||
|
||||
```
|
||||
{
|
||||
"credentials_info": {
|
||||
"type": "service_account",
|
||||
"project_id": "...",
|
||||
"private_key_id": "...",
|
||||
"private_key": "...",
|
||||
"client_email": "...",
|
||||
"client_id": "...",
|
||||
"auth_uri": "...",
|
||||
"token_uri": "...",
|
||||
"auth_provider_x509_cert_url": "...",
|
||||
"client_x509_cert_url": "...",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You should then be able to connect to your BigQuery datasets.
|
||||
|
||||
To be able to upload CSV or Excel files to BigQuery in Superset, you'll need to also add the
|
||||
[pandas_gbq](https://github.com/pydata/pandas-gbq) library.
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
name: Google Sheets
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/google-sheets
|
||||
index: 17
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Google Sheets
|
||||
|
||||
Google Sheets has a very limited
|
||||
[SQL API](https://developers.google.com/chart/interactive/docs/querylanguage). The recommended
|
||||
connector library for Google Sheets is [gsheetsdb](https://github.com/betodealmeida/gsheets-db-api).
|
||||
|
||||
There are a few steps involved in connecting Superset to Google Sheets. This
|
||||
[tutorial](https://preset.io/blog/2020-06-01-connect-superset-google-sheets/) has the most upto date
|
||||
instructions on setting up this connection.
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
name: Hana
|
||||
menu: Connecting to Databases
|
||||
route: /docs/databases/hana
|
||||
index: 18
|
||||
version: 1
|
||||
---
|
||||
|
||||
## Hana
|
||||
|
||||
The recommended connector library is [sqlalchemy-hana](https://github.com/SAP/sqlalchemy-hana).
|
||||
|
||||
The connection string is formatted as follows:
|
||||
|
||||
```
|
||||
hana://{username}:{password}@{host}:{port}
|
||||
```
|