Profile picture for user Tobias Blickle

With MashZone 1.0.1 “dynamic data source parameters” are supported. As mentioned earlier, this sounds boring, but is quite useful. To explain, I made a MashApp that provides some basic information about the countries of Europe.

You can select a country in the combo box and then some information as the name of the capital, the population, the area and a list of regions is displayed.



Let’s focus on this list: If you select “Germany” as country, so will see there the “Bundesländer” of Germany as Bavaria, Baden-Württemberg or even Saarland. When you select a different country, for example France, you will see departments as Alsace, Bourgogne or Champagne. This list is queried with the parameter of your selection in the moment you change the selection of the combo box. This is why it is called “dynamic data source parameters” ;-)



Let’s have a closer look, how it works. I use the API from GeoNames.org that provides the list of regions for a given country. E.g. by calling http://ws.geonames.org/children?geonameId=2921044 you get an XML file containing the Bundesländer of Germany. “2921044” is the ID of Germany and it is obviously the parameter to the API call. So I built the following feed:



The key idea is that the value of the query parameter “geonameid” is not fixed but  the URL is determined during runtime. To be able to so, this parameter is made a “User input text” called “geonameid” to the feed and passed to the data source using the “Create URL” operator. As a result, each time the value of the parameter “geonameid” changes, a new query is made calling the data source with this parameter and the new results are provided by the feed output.



And this is really powerful, as you can see here: The combo box with the names of the European countries is fed by this feed (without parameter, hence returning the European states as result as “6255148” is set as default in the feed):



Additionally to the names, also the “geonameid “ is fed into the combo. If you select now a country from the list, the corresponding geonameid is used to trigger a new query and display the results in the regions table:

 

Please note that the selection if the combo box is not used as filter, but as input to the feed. You can make this assigment by clicking on "Filter data" of the feed, but then selecting "user input" instead of "data feed column":

You can find the MZP of this MashApp attached. I think this passing of parameters is very powerful and I am sure you will have a lot of use cases within your own MashApps.



Keep on Mashing!

Tobias

 

File attachments
by Matt Green
Posted on Thu, 04/29/2010 - 11:50

This is outstanding Tobias!  Great work.

0
by Nina Uhl
Posted on Thu, 04/29/2010 - 11:53

Awesome, Tobias!

0
by Brian Deeley
Posted on Thu, 04/29/2010 - 16:46

Thanks Tobias! Just what I was looking for! 

0
by dario borsotti
Posted on Thu, 05/13/2010 - 12:44

tks!

0
by Christian Neu
Posted on Tue, 08/10/2010 - 09:07

Is it possible to insert a value into the parameter input of a data feed column?

Thanks in advance.

 

//Update: That's my problem:

0
by Stephan Freudl
Posted on Tue, 08/17/2010 - 08:34

Sure it is. Please keep in mind that docking points on the right (and left) hand side represent single values. In contrast the docking points on the upper and lower represent an entire table.

To draw the connection intended in the screenshot you need to convert the data feed result into a single value.

0
by Sezgin Kaya
Posted on Thu, 03/03/2011 - 12:34

Tobias,

This is excellent - although I am not famililar with uses of api's / url's... Could you explain some basics here to work around real-time data from an internet source, and linking to Mashzone's url:

1) How do you make 'calls' from an api? What is a "call"?

2) What is the best way of finding api's on the net? (It does not seem to me obvious on geonames website, for example, where api's are stored, and how do we understand there is a link to a real time source? )

3) More importantly, how do you create your own url? - mainly to receive real-time data from a source or database? (very interested in boiler real-time stuff you did!)

Thanks in advance.

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock