The unpacking and loading of a generic database can be done with a generic prefix.
Generic databases / data sources contain structured repetitive data, for example, an address list or a product spec sheet where entities are repeatedly described along similar attributes.
Syntax:
Generic( loadstatement | selectstatement
)
For more information about using LOAD statements, see
Load.
For more information about using SELECT statements, see Select.
Examples:
Generic
LOAD * from abc.csv;
Generic
SQL SELECT * from table1;
Tables loaded through a generic statement are not auto-concatenated.
Example 1
Load script
Add the example script to your app and run it. Then add the fields listed in the results column to a sheet in your app to see the result.
For more information about using inline loads, see Inline loads.
Result
Resulting table
Region
Name
Address
Phone
SWE
CCC
C7789
003-789
US
AAA
A123
001-123
US
AAA
A123
002-456
US
AAA
B456
001-123
US
AAA
B456
002-456
US
BBB
A123
001-123
US
BBB
A123
002-456
US
BBB
B456
001-123
US
BBB
B456
002-456
Example 2
Load script
Add the example script to your app and run it. Then add the fields listed in the results column to a sheet in your app to see the result.
Sheet1:
Generic Load * inline [
object, attribute, value
ball, color, red
ball, diameter, 10 cm
ball, weight, 100 g
box, color, black
box, height, 16 cm
box, length, 20 cm
box, weight, 500 g
box, width, 10 cm ];
For more information about using inline loads, see Inline loads.