- poetry
- Must set MB_API_KEY to use Notify API
$ poetry install
- Copy
env.sample
to.env
or set environment variables
- requires environment variables
- METABASE_USER
- METABASE_PASS
- METABASE_URL
$ ./metabase-python-api-notify.py create_session_token
- or to store in environment variable
$ METABASE_SESSION_TOKEN=./metabase-python-api-notify.py create_session_token
- requires environment variables
- METABASE_URL
- requires session token to be passed as an argument
$ ./metabase-python-api-notify.py $METABASE_SESSION_TOKEN
- response will be JSON list of databases and database attributes
-
requires environment variables
- METABASE_URL
- MB_API_KEY
-
requires argument
- database_id - should be integer
-
optional parameters
- table_id - should be integer (cannot use with table_name)
- table_name - should be string (cannot use with table_id)
- scan_type - should be string (either
full
orschema
)
-
Format
$ ./metabase-python-api-notify.py database_id table_id=table_id table_name=table_name scan_type=scan_type
-
Example: rescan database 15
$ ./metabase-python-api-notify.py 15
-
Example: rescan database 15 table 41
$ ./metabase-python-api-notify.py 15 table_id=41
-
Example: rescan database 15 table abc_123
$ ./metabase-python-api-notify.py 15 table_name=abc_123
-
Example: rescan database 15 full
$ ./metabase-python-api-notify.py 15 scan_type=full