StockChart widget shows 'Illegal structure parameter specified'

13 views
Skip to first unread message

Jochen Zehnder

unread,
Apr 13, 2017, 4:31:14 AM4/13/17
to Information Workbench Discussions
Hello everybody,
on one of our wiki pages we want to display a StockChart widget. However, when I add the FILTER keyword to the query, I receive the following error:
Invalid widget configuration: com.fluidops.iwb.api.operator.OperatorException: Illegal structure parameter specified: ?pred

The query itself seems to work, at least when I execute it in the /sparql interface, I receive the correct result.

The widget configuration I use, looks as follows:

{{#widget: StockChart

        | query = 'SELECT ( COUNT ( ?core ) AS ?cores ) ?date WHERE {

               GRAPH history:MetaContext {

                       ?a rdf:type dynProd:LicenseSnapshot .

                       ?a dynProd:graph ?graph .

                       ?a historySnapshot:type history:DailySnapshot .

                       ?a dc:date ?date .

                       GRAPH ?graph {

                               ?pi dynProd:licensedBy ?lic .

                               ?pi ?pred ?core

                               FILTER (?pred = dynProd:usesCore || ?pred = dynProd:usesCoreNoLic || ?pred = dynProd:usesCoreTryNBuy ) .

                       }

               }

       } GROUP BY ?date

         ORDER BY ?date'

       | repository = history

       | input = 'date'

       | output = {{ 'cores' }}

       | asynch = true

}}


We are currently running version 7.1.0.2993.

Do you have an idea, how I can get the widget to work?

Thanks
Jochen

Andreas Schwarte

unread,
Apr 13, 2017, 5:45:58 AM4/13/17
to iwb-dis...@googlegroups.com

Hello Jochen,

 

Here is the explanation for what you observe:

 

In our widget configuration serialization (i.e. the wiki text) the ‘|’ character is a reserved one with a special meaning. Hence, inside a SPARQL query, i.e. in your case for the OR inside the FILTER you need an escape sequence.

 

In your case you can escape the | inside the query in the wiki text with {{Pipe}}{{Pipe}} which is replaced with the correct character at execution time.

 

Note that when using the widget configuration form (which is always recommended) the escaping is done automatically, only when manually modifying the widget configuration inside the wiki text you have to take care for it.

 

See [1] for details

 

Best,

Andreas

 

 

[1] http://help.fluidops.com/resource/Help:Widgets#Embedding_Widgets_into_Wiki_Pages

--
You received this message because you are subscribed to the Google Groups "Information Workbench Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iwb-discussio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jochen Zehnder

unread,
Apr 13, 2017, 8:05:55 AM4/13/17
to Information Workbench Discussions
Hi Andreas,
thanks for your quick response.

After applying your fix, it worked. Next time I will also use the widget configurator for troubleshooting.

Thanks 
Jochen
Reply all
Reply to author
Forward
0 new messages