Follow the steps to build a query using the Simple Query Builder.
You can build Select statements only.
- Sign in to VantageCloud Lake.
- Open the Editor and create connection.
- Click
.
- In the Build query window, enter or select the following as required.
Field Description Data sources Select the required database and tables for your queries. If required, you can select multiple data sources and use Joins to establish relationships between tables. The Joins displays only when you select multiple data sources.Columns Lists a comprehensive list of all the columns derived from the tables that you have selected in the Data source. Select the columns required for your query from the drop-down list. If you are using multiple data sources, multiple drop-down menus are displayed corresponding to each data source.
You must select at least one column to build the query.Filters Apply filters to retrieve only desired results. You can apply filters using Column names, Conditional Operators, and Values. - Column: Name of the column to apply filter.
- Operator : Select the appropriate condition operator to define the relationship between the column and the filter value.
The common conditions operators are: =, <>, <,>, <=, >=, IS NULL, IS NOT NULL, LIKE, NOT LIKE, IN, and NOT IN.
If using ‘IN’ and ‘NOT IN’ condition operators, you must select multiple values.
If using IsNull and IsNotNull operator, no values are required.
- Value: Enter the value to compare with the column value.
You can add multiple filters using AND (to satisfy both conditions) and OR (to satisfy either of the conditions).
Joins The Joins section is enabled when you select multiple data sources. The following are the parts of the Join section: - Table selection: Select the tables from different data sources and select the appropriate tables to establish relationship between data sources.
- Join Type: Select the join type to determine the type of join. The common join types are: Full outer, Inner join, Left outer, Right outer, and Cross.
- Join Condition: Define the join conditions by specifying the columns or expressions to establish the relationship between the tables. The join condition typically involves comparison operators such as "=", "<", ">", etc.
You cannot join a table by itself. Also, circular join conditions are not allowed in join operations. A circular join condition occurs when there is a circular dependency or loop in the join relationships between tables.Sorts Select the columns on which the results are sorted. You can include one or more columns. Duplicates Select whether to include or exclude duplicate values in the result set. Result Limit Select the number of results to show when you run the query. Default: 50
See SQL Fundamentals for more details.
- Select View Query to view the SQL syntax of the query. You can copy the syntax to clipboard.
- Select Add to Script to open the query in the Editor.
- Select Run to run the query.You can save the query using Save as or rename the query using Rename options of the menu.
In case of any errors, rebuild the query with necessary corrections.