Store/Fetch MashzoneNG feed results into/from TCStore:
This guide demonstrates on how to store the results of a feed in a TCDB store. Then users can access the contents of the store and visualize it using dashboard widgets.
Feed processing generally cache the feed results internally, refreshing this cache depends on refresh rates of underlying source of the feed. In some case you may want to run follow-up tasks over these specific results.
For this purpose, you can cache the feed results into the TCDB and have explicit control over the storage.
Prerequisites:
In order to illustrate this scenario, check the following Prerequisites.
- Latest MashzoneNG installation at least 10.3 version, with server up and running.
- 10.3 or latest TerracottaDB installation, which is compatible with MashzoneNG.
- Excel with series of data to push into TCStore.
Illustration:
Create a DataFeed in MashzoneNG:
- Navigate to MashzoneNG http://<hostname>:8080/mashzone.
- Login using your credentials.
- Navigate to Data Feeds --> Create data feed to create a data feed with excel data.
- Copy the excel you have into the folder <InstallDir>\ MashZoneNG\mashzone\data\resources
- While creating a Datafeed, select Excel as a resource from left panel and upload the excel.
- Map the outcome of this resource to output as below and note the output.
- Now select Manage --> Save as to save the data feed.
- You will get a Properties pop up now, provide the required details and click on OK button to save the model.
Register Terracotta DB connection:
- Navigate to the Mashzone NextGen url: http://hostName:8080/mashzone
- Key in the Credentials.
- Open the Admin Console.
- From the left side Navigation under Server, select TerracottaDB
- Click on Register New Terracotta DB Connection
- Provide TerracottaDB Alias (TerracottaDB connection name) and use the DB server url like terracotta://VM_1:<TCDB_PORT>,VM_2:<TCDB_PORT>...VM_N:TCDB_PORT
Also, select the Materialized Feed support checkbox and provide the off-heap resource and Data Resource from TCDB.
- Click on Update connection button to save the connection.
- Click on the icon to verify the connection from the TerracottaDB connection page.
Create Materialized Feed for Terracotta DB:
- Navigate to the MashzoneNG url: http://<hostName>:8080/mashzone
- Provide the Credentials.
- Open the Admin Console.
- Select Materialized Feeds --> Materialized Feeds from left side panel.
- Provide Alias, feed you created in earlier steps, TCDB connection name and Dataset name (will be auto populated).
- Click on save button to save the feed.
- Click on Calculate and materialize feed results to feed the data into the TCStore and click yes on popup.
- You will get confirmation message too.
Fetch materialized feed data from TerracottaDB:
- Navigate to the MashzoneNG url: http://<hostName>:8080/mashzone
- Provide the Credentials.
- Click on Data Feeds --> Create data feed.
- In data feed editor, select TerracottaDB from left side panel as source.
- Select Source as Materialized feeds
- Materialized feed name as the alias which we created in earlier step. As below.
- You can use the same data feed to generate a MashzoneNG Dashboard as well.
Update Materialized feed data from Integration Server:
- Once the data is pushed from MashzoneNG as part of Materialized data feed.
- Data will now present in the TCDB Store.
- You can have a TCDB Adapter installed in your client machine.
- Where you can manipulate this data by fetching it from TCDB adapter connected to Materialize data feed data set.