To define a pseudo table based on a composite table and query data in the composite table on Metadata Editor, there are mainly four steps – creating pseudo table & DQL table metadata file → defining pseudo table →generating a table from the pseudo table → performing DQL query.
Let’s take a look at the process through examples.
Start Metadata Editor and click New icon :
Select Pseudo table and DQL table to create a new pseudo table and DQL table metadata file.
Click Add pseudo table icon to add a new pseudo table.
There is pseudo.zip file under【esProc installation directory】\ esProc\documents\en. The file stores composite table files used in DQL Tutorial. Just decompress it for use.
Click Select to select the decompressed composite table file emps.ctx. The system automatically recognizes and uses emps as the pseudo table name, and list the composite table’s fields and primary key under Select field(s):
Click Save button to save the pseudo table definition to the metadata file. The file name is demo.glmd.
The example composite table file (emp.ctx) has fields such as EID, DeptID, Gender, Married, Name, as well as a Bools field that store Gender and Married fields together. Below is the composite table’s data:
About generating the original composite tables, see Pseudo Table: Basic uses in esProc Tutorial.
Click through the menu bar Tool - Generate table from pseudo table:
In the left part of the above screenshot, Pseudo table column displays pseudo table names and Table column has user-definable DQL table names.
Click OK and a DQL table is automatically generated.
Click Save button and the DQL table is also saved to the metadata file demo.glmd.
Click Tool - DQLquery in the open demo.glmd file to pop up the DQL query window:
Double-click table name emps and a query statement appears in the above DQL Query Edit box:
Click Execute button to view data in the query result: