Skip to main content

Data & Intelligence

Iterative BI + Gradle Tips and Tricks – Plugins

Quick tip of the day:

Data Intelligence - The Future of Big Data
The Future of Big Data

With some guidance, you can craft a data platform that is right for your organization’s needs and gets the most return from your data capital.

Get the Guide

Use Gradle plugins to package up functionality for easy reuse.  For example, we developed a simple “database” plugin to handle the common tasks associated with building and upgrading a database.  Things like:

  • build – create a new database from scratch. Runs the CREATE DATABASE and sqlcmd’s the full DDL
  • upgrade – checks the current version, looks for (and generates from the model if needed) and upgrade script, and runs it.
  • clean – DROP DATABASE – get ready for something new.
  • load – part of “build”, load static initial data from CSV files into the newly created database structure.

Now, all we do to enable a database in our environment is add a build.gradle file to the database directory (with ddl/, sp/, and data/ subdirectories) with:

apply plugin: 'Database'

Away we go!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Chris Grenz

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram