About This File
This component provides Tibco® Live DataMart configuration and TableProvide sample source code. The TableProvider sample code reads Excel files, just as an example. While it's convenient to simply read files, this does mean that effectively only LiveView SNAPSHOT queries are supported.
A TableProvider is intended to front a data source that has some native querying capability. As reading Excel files doesn't natively provide any querying capability, this sample simply provides predicate support to read row ranges from the Excel spread sheets.
Files Included
A file called ExcelLiveview.lvconf configures the TableProvider class and passes parameters - the name of Excel files to present as tables - to this class.
Running The Component
You can start this LiveView project from Studio by right-clicking on the project selecting Run As -> Liveview Project.
This project is configured to run only a services layer and the default port of 10080 is used.
Once started you should see two tables presented, ItemsSales.xls and ItemsInventory.xls. If you have access to Liveview desktop, download the workspace and you will see a grid of the ItemsSales data and a pie chart for the ItemsInventory data.
You can also query the tables via lv-client by:
lv-client select "* from ItemsInventory.xls" lv-client select "* from ItemsSales.xls where 1,20" lv-client select "* from ItemsSales.xls limit 10"
The later query has a limit of 10 rows which will cause the query to terminate early. To see all 3,000 rows of ItemsSales.xls, remove the limit.