LiveData: How to build a custom Datasource

Hi,

I’ve been trying to build a custom livedata datasource (I’m using XWiki 12.10.7). The datasource will go off to another service to collect up the data, format it according to the livedata structure and hopefully that will mean it can be rendered by the livedata macro.

I’ve been using the Live Table source as an example to work from whilst also trying to keep my code as simple as I can until I become more familiar with how it all works.

My current problem seems to be that the Live Data framework is not picking up my data source. If I go to https://<xwiki>/rest/liveData/sources/ I get an XML response that lists the liveTable datasource but my data source is not listed.

I guess my first question is… Does anyone know what the minimum criteria is for a custom data source to be seen by the Live Data framework?

Thanks in advance,
Alex

I’d forgotten to update the components.txt file :man_facepalming:

It’s amazing what you think of when you’re washing the dishes…

Cheers

3 Likes

I’ve been washing dishes for a couple of weeks now to no avail!

Thus, I think more skills and magic are required to connect to an external database.

Please, could you describe your setup in a bit more detail your set up? I need to understand how to connect to relational (most of them) databases through my institution from XWiki. I will give myself time and reasons to develop more ambitious plans. It is easy to do that if you expose the password with SQL Tools, but it is unclear to me how to accomplish the same objective using components.

For instance, here is the answer from my current test XWiki instance when accessing /rest/liveData/sources:

https://portal.igfae.usc.es/xwiki/rest/liveData/sources

Could you help me to understand what I am getting there?

Where must components.txt be located, and what must its contents be? Thanks!

https://extensions.xwiki.org/xwiki/bin/view/Extension/Component%20Module#HComponentRegistration