Metabase Automation is a program written in Ruby and helps to create Metabase models. The aim is to create easily models based on Decidim needs.
Based on the Metabase API, it helps creating Metabase resources based on YAML config files present in ./cards/decidim_cards
and a config.yml
This program is not a dedicated gem, you must run it using the main.rb
file. However we'll probably enhance tests and library and then share it.
- Ensure file
main.rb
has the execution rights, if not, add it :
chmod +x main.rb
- Install dependencies:
bundle install
- Pull the defined submodules
git submodule update --recursive
-
Move
config.yml.example
toconfig.yml
and replace placeholders by your configuration. -
Don't forget to setup env variables for Metabase connection:
export METABASE_HOST='metabase.example.com' && export METABASE_USERNAME='[email protected]' && export METABASE_PASSWORD='secretpassword'
# Also possible to put relevant variables in a .env file
You also can use a .env
file containing the relevant informations
METABASE_HOST='metabase.example.com'
METABASE_USERNAME='[email protected]'
METABASE_PASSWORD='secretpassword'
and source it
source .env
You can easily execute the program with one of these commands :
make
# OR
make run
# OR
bundle exec main.rb
# OR
ruby main.rb
# OR
./main.rb
For now Metabase Automation simplify operations for our Data team. Please note that the code is not efficient and potential fails are present. At the moment, it shouldn't causes specific issues on your Metabase server.
Contributions are welcome, at the moment it is still in development.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Metabase Automation project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.