Hi
How We can Get data From data Source Like execl and XMl files or SQL database ?
Hi
How We can Get data From data Source Like execl and XMl files or SQL database ?
To read a simple text file add a Text File module (or simply drag and drop a .txt file into your compound).
It will output the whole file (or its selected rows) as a Text value which can be processed with the several text processing modules.
For e.g. if the file contains a comma-separated list of items you can retrieve one or more items by using the Text Slice module.
You set comma as the Separator and specify a Start Index as the index of the element you need:
Also you can split the text into lines by using the Line Separ property.
For e.g. if you are interested in the second line:
Suppose you want to retrieve a number which is the third element of the second row, you can reach it by combining the two above:
You can get data from XML, JSON and simple text files, or you can query from an SQL database (only MySQL is supported currently).
Direct read of Excel files is not supported, please export it first to XML or text.
You can simply drag and drop an XML or JSON into your compound.
You'll get the data in the form of a Collection value in Aximmetry. Please watch this video on the Collection data type:
https://youtu.be/XbQcChdIEOo?t=213
(the video uses a JSON file, but XML is handled exactly the same way).
---------------------------------------------------------
To use SQL you have to add an SQL Database module and one or more SQL Query modules:
For the database specify the URL user/password and schema name:
For each Query module specify an SQL query:
You can repeat the query anytime with the Query trigger, or you can setup a repeating Automatic Query using an arbitrary Interval.
The output is a Collection value containing a subcollection for each returned row.
You can select the rows for e.g. with a Subcollection module using the name Row and a row index starting from zero: