Access data on a json file or csv file on a Database

Hello all,
I am exploring the feasibility of accessing a JSON or CSV file in the EPL program through MongoDD database interaction, similar to how it’s done with Pandas in Python for an Excel file.
I came across this resource on the Apama Database: (ApamaDoc).

Could you provide a simple example of how to access a 2x2 table using these API calls? Would it be similar to how we access measurements? For instance, if I have a table like:

Child device ID Email To
123456789 [xxx.xxx@xxx.com, yyy.yyy@yyy.com]
987654321 [zzz.zzz@zzz.com, www.www@www.com]
on all (Measurement(type="Child device ID") as ChildDeviceID and Measurement(type="Email To") as EmailTo)
		{

Hi Gabriele,

could you explain what you mean by database access? Do you mean an external SQL database?

If you do not have a specific table you want to connect to, you can use the Cumulocity Inventory API. You would store the JSON inside a managed object:
https://documentation.softwareag.com/pam/10.15.1/en/webhelp/related/ApamaDoc/com/apama/cumulocity/ManagedObject.html

and could then search for it like this:
https://documentation.softwareag.com/pam/10.15.1/en/webhelp/related/ApamaDoc/com/apama/cumulocity/FindManagedObject.html

or update it by sending back the Managed Object to Cumulocity IoT.

Hello Harald,
Let’s start by noting that this is a MongoDB database, which is a document-oriented or NoSQL database.
This database is the database of cumulocity, where APAMA resides.
I would like guidance on accessing the database from the initial setup and retrieving data from it. The table structure could be a simple 2x2 table, similar to the one I mentioned in the previous message.

I’ve explored the APAMA documentation, but I find myself a bit lost. That’s why I’m turning to the knowledgeable APAMA community for assistance.
If you need additional information from my end, please feel free to ask.
I’m eager to learn how to accomplish this task.
Thank you once again.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.