Hi, We've implemented an approach to read data from all the tenants in the system by the super tenant, where the table read from the tenants should have the same table name.
So now, with the following syntax, you will be given an aggregated view of all the data records from all the tenants. create temporary table T1 using CarbonAnalytics OPTIONS (tableName "T1", schema "d1 int, d2 string, _tenantId int", globalTenantRead "true"); There is a new analytics provider property introduced, which is "globalTenantRead", where when this is set to "true", it will go through all the tenants in aggregating records of a table named "T1" in that tenant. Also a new special table schema attribute "_tenantId" is introduced, which is an automatically populated value for a record based on the actual origin tenant of the record. So this "_tenantId" field can be used for further filtering/grouping in the Spark queries. With this new feature, there is a change in the way DAS stores the metadata of each analytics table. So because of this, there is a migration step when going from DAS v3.0.x to v3.1.0+. Since it is just a table metadata format change, not data itself, the migration process is a very quick one. The migration process has been incorporated to the DAS data backup tool [1], and the migration guide in the docs are updated here [2], and general docs on $subject is updated here [3]. [1] https://docs.wso2.com/pages/viewpage.action?pageId=50505847 [2] https://docs.wso2.com/pages/viewpage.action?pageId=50505762 [3] https://docs.wso2.com/display/DAS310/Spark+Query+Language#SparkQueryLanguage-WSO2DASSQLguide Cheers, Anjana. -- *Anjana Fernando* Senior Technical Lead WSO2 Inc. | http://wso2.com lean . enterprise . middleware
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
