Hi All, I came up with an issue while working on my publisher dashboard widgets creation.
*Issue:* No option to join tables in siddhi queries. *Widget:* Applications Created Over Time + (Other widgets which will consume AM_DB data) *Data source:* I am using Siddhi store data provider with the shared AM_DB. (In the deployment.yaml file I have added a data source referring the AM_DB at APIM side.) ************ sample providerConfig in widgetConf.json **************** "type": "SiddhiStoreDataProvider", "config": { "siddhiApp": "@App:name('App Name') @primaryKey('Primary Key') @store(type=\"rdbms\" , datasource=\"AM_DB\") define table TableName (Column Headings with Types) ;", "queryData": { "query": "Query" }, * **************************************************************************** *Required Widget View: * According to the below figure the first combo(All APIs or My APIs) will provide the user an option to filter the API list in the third combo. API list inside the third combo will be populated by AM_API table using a separate query in the widgetConf.json. The second combo will list down the APP creators which will be populated by AM_subscriber table using another query. And according to the selected options in these combos the data will be filtered from AM_APPLICATION table. [image: App-Registrations.png] *Query used to generate the graph in APIM 2.6 version: * https://github.com/wso2/carbon-apimgt/blob/v6.4.50/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.client/src/main/java/org/wso2/carbon/apimgt/usage/client/UsageClient.java#L331 Ex: If a user has selected options other than 'All' for both second and third combos, the data should be filtered from AM_APPLICATION table joining with 3 other tables AM_API, AM_SUBSCRIBER, and AM_SUBSCRIPTION. But as there is no way to join tables using siddhi queries (And as RDBMS batch data provider will not be OK with changing DB types), there will be an issue to generate widgets which consumes data from AM_DB (This issue doesn't count for the widgets generated by STAT_DB since the data will be extracted from a single table). Highly appreciated if you can suggest any solution for this. Thanks in advance. Best Regards, *Sandalu Kalpanee* *Software Engineer - Intern* *WSO2*
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture