Trigger Tableau Schedule from Talend
September 14, 2014
, , , , ,

Tableau Schedule is triggered from Talend - see component description

In part one we just made a fantastic java class for triggering Tableau Server schedules from pure java – for profit and fun. The goal is to have a component which can trigger schedule refreshes on the Tableau Server directly after the ETL processes, without any platform dependent code or command line invocation. In this second part, I should move the code under Talend ETL to make my customer happy.

In Talend, there should be a directory dedicated for custom components, all the custom components will be put into this dedicated directory. To set up this location:

  1. Create a directory in any place of file system, for example: D:/custom_component.
  2. Go to configure the path of dedicated component directory in Preferences, launch Talend Studio, open Window,  followed by PreferencesTalendComponents, and then browse the User component folder path, finally, click OK button, Talend Studio will reload all the custom components.

Talend Custom Folder

Now we have to create a directory for our component (let’s call it tTableauTriggerSchedule) inside the component folder and place the following files there:

  1. tTableauTriggerSchedule_icon32.png  – this will be the picture of our component (32×32 pixel)
  2. tTableauTriggerSchedule_java.xml – the metadata description for the component
  3.  – captions (for localization)
  4. tTableauTriggerSchedule_main.javajet – java template for code generation

The image is easy, I suppose all of us are black belt in paint.exe. But what to put into tTableauTriggerSchedule_java.xml?

Explanation for the sections:

  • Line 1-23: Boring stuff, who did what, where to put on the palette, where is the documentation.
  • Line 24-33: By declaring max_input=0 for flow and interate input/put we just state that this component cannot process or produce data sets. This is fine, as we really do not have to such things.
  • Line 34-44: We will ask for four required parameters, all text types (hostname, user, password, schedule name). NUM_ROW sets the display order in Studio.
  • Line 47-57: This is the class (built into jar) from the part I including its dependencies (you should find these jars in one of the subfolders under your home directory). You should copy all these files into the component folder.

We should give names for the component and for the parameters. Lets use this content for the messages file:

Please note that HOST, USERNAME, PASSWORD and SCHEDULE are parameter names. By adding a .NAME suffix we can assign a GUI label for them. Let’s focus on the last piece, the business logic (java template) itself:

As you see, the format is very similar JSP files (those are also java jet files). Compilation time talend will execute the template java code (within <% and %>) and generate the real java file, which will be executed during run time. Since we built our nice WebServiceClient class with one single static function, we just need to get the parameter values from the GUI during compilation time – and it will be executed from Talend during run time with the correct values.

These parameters will be substituted in the generated java code

These parameters will be substituted in the generated java code

Woah! It’s so simple. Where is the complexity?


If you are lazy to go thru on this tutorial, then you can find the component ready to install on talendforge:

If you want to know more about Talend component creation I would suggest this link:

On the other hand you should also check out my other tutorial: How to generate the initial extract with Tableau Server (from Java).

Tamás Földi

Related items

/ You may check this items as well

sync frelard

Tableau Extensions Addons Introduction: Synchronized Scrollbars

At this year’s Tableau Conference, I tried t...

Read more

Tableau External Services API: Adding Haskell Expressions as Calculations

We all have our own Tableau Conference habits.  M...

Read more
Scaling Tableau Image

Scaling out Tableau Extracts – Building a distributed, multi-node MPP Hyper Cluster

Tableau Hyper Database (“Extract”) is ...

Read more