Get To Know Extrata, Episode 1: The Command Line Interface

Steven NgDaily Debug BlogLeave a Comment


We’ve been a little remiss in keeping up our marketing efforts for Extrata, and we’re going to try to change that. This post is going to be the first of hopefully many articles to come.

Extrata is a pretty nifty product. If I’m being honest, it’s not an easy product to explain, because it can do so much. There’s no one singular, pithy sentence that can be used to describe it. Why, because it can be different things to different people. Either way, there are a lot of features that have been added in the past months to Extrata that haven’t even been posted to our web site. So this “series” of posts is an attempt to remedy that.

All right. Let’s go. I don’t have any particular order for these posts, so I pick whatever’s at the top of my head. This week, it’s the Extrata Command Line Interface.

The Superhero Origin Story

The Extrata Command Line Interface (CLI) is available to Enterprise users of Extrata. It’s a Windows executable that lets you run Extrata tasks headless on a server and/or integrate it with other tools that have shell execution capability.

The CLI does have its own origin story. In the early days of Extrata, Vince and I would have regular back and forths about what the app could be able to do. Our initial release was a simple proof-of-concept. Pluck some API data from Stripe and dump it into Excel. Ideas germinated. Ideas grew. As with any new product, if you give users an ounce of functionality, they’ll be asking for a pound in short order. Vince had ideas abound. Could we schedule it? (Yes, but.. that’s an explanation for another episode of Get To Know Extrata) Could you run it on a server? With the CLI, yes!

As we started to build out functionality, I added the ability to back up your Extrata content into an archive. Once I wrote this code, I took a further step of letting you export an Extrata project and its tasks into a package. And with this feature, I was finally able to create the command line interface.

An Extrata package file is basically a password-protected archive that is portable. My original intention was the ability to create a sample project and be able to share it with other Extrata users. Because the package file is self-contained, it also allowed me to compile a command line version of Extrata so the tasks could be run headless. Cool!

How To Use The Command Line Interface

From any Extrata project information page, click on the Export Project Package icon (it looks like a box with a down arrow).

A pop-up will appear.

In the Save To field, browse to a location on your computer and give the file a name with the .zip extension.

Click on the Include Secrets checkbox. This will put the passwords and/or API keys you need to run the tasks in your project into the package file.

In the Password and Password Confirmation boxes, enter a long secure password. You will need to provide this package file to the command line interface to run the task.

If you go back to the project information page, you should see a section called “Example Command Line Invocations”. In that section is a list of sample commands that you can use to execute the task from the command line.

You can use these as a template to fire off commands. For example:

extrata_cli.exe -z E:/Extrata/ -p {package password} -t 6814bdab-89fb-413c-9ca3-f2c4a43015c3 &&:: Calendarific Canada

In the example above, you would replace {package password} with the password you used to save the package file. Also, you may have to provide the full path to the extrata_cli.exe file. Note that the &&:: Calendarific Canada text above is a comment to help you identify which task the command applies to. You can leave it out at run time.

If, for example, your password for the package was test_password, then the command would be:

extrata_cli.exe -z E:/Extrata/ -p test_password -t 6814bdab-89fb-413c-9ca3-f2c4a43015c3

If you’re an advanced user and you’re wondering what the command line switches are, they are as follows:

-zThe path to the Project package zip file
-pThe password for the Project package zip file
-tThe ID for the task to be run. You can find this in the Task Info page or the Project info page’s Example Command Line Invocations list

Real World Use Cases

We’ve used the command line interface in different ways. We’ve used it with Windows Scheduler. We’ve also used them in batch files and in Pentaho Data Integration as part of a larger ETL solution. You’re basically limited to your imagination. We have implemented Extrata-based solutions on client servers using the command line interface.

No matter how you you choose to use it, the Command Line Interface does let you take Extrata to the next level. It transforms Extrata from an End User tool to an Enterprise tool, which is why it’s available only with the Enterprise Edition of Extrata.


Other articles by this author:

Leave a Reply

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