Data warehouse Design Using Oracle
https://www.oercommons.org/authorin
g/edit/21861
Dr. Girija Narasimhan 1
OER- UNIT 5 SQL MODEL CLAUSE
Part 1- SQL model clause
2
Dr. Girija Narasimhan
Model Clause
3
Dr. Girija Narasimhan
Model Clause
With the SQL model clause you build one or more
matrixes with a variable number of dimensions. This is
called the model.
The model uses a subset of the available columns from
your FROM clause.
It contains at least one dimension, at least one measure
and optionally one or more partitions
create table salesorder(ord number(4) primary key,prodno
number(3),suppno number(3),time number(5),location
varchar2(20),sales number(6));
4
Dr. Girija Narasimhan
Model Clause
Ord Prodno Suppno Time Location sales
1 1 1 2000 Sohar 5
2 1 1 2000 Muscat 3
3 1 1 2001 Sohar 6
4 1 1 2001 Muscat 4
5 1 2 2000 Sohar 1
6 1 2 2000 Muscat 7
7 1 2 2001 Sohar 8
8 1 2 2001 Musat 5
9 2 1 2000 Sohar 3
10 2 1 2000 Muscat 8
11 2 1 2001 Sohar 6
12 2 1 2001 Muscat 7
13 2 2 2000 Sohar 9
14 2 2 2000 Muscat 11
15 2 2 2001 Sohar 4
16 2 2 2001 Muscat 3
5
Dr. Girija Narasimhan
Model Clause
Partition columns
Partition columns divide the result set into blocks. Rules defined
in the model clause are applied independently of other
partitions to each partition.
Dimension columns
Dimension columns define how cells within a partition can be
accessed.
Measure columns
The columns defined as measures can be assigned new values
in the rules section of the model clause.
6
Dr. Girija Narasimhan
Model Clause
Part 2- Dimension by
Unique column
Dr. Girija Narasimhan
Model Clause
7
Dimension by
Unique
column
Multi dimension
column
Aliasing Expression
Dr. Girija Narasimhan
Model Clause
8
In the model clause, the dimension components
are used to define multi-dimension array and it
is also useful for identifying cells or column
within the partition.
By default it will identify at least one cell in a
partition
The dimension components have the column name
which has unique value
Dr. Girija Narasimhan
Model Clause
9
Query Output
Select ord, sales from salesorder
Where time=2000
model
dimension by(ord)
measures(sales)
rules()
order by ord;
ORD SALES
---------- ----------
1 5
2 3
5 1
6 7
9 3
10 8
13 9
14 11
8 rows selected.
Dr. Girija Narasimhan
Model Clause
10
Column value given in the dimension is not unique
then it will give "non unique addressing" error.
Dr. Girija Narasimhan
Model Clause
11
Part 3- Dimension by
Multiple dimension using
unique keys
Dr. Girija Narasimhan
Model Clause
12
It is possible to use more than one dimension column be
specified.
But all the combination gives the unique row identification
Dr. Girija Narasimhan
Model Clause
13
Part 4- Dimension by
aliasing
Dr. Girija Narasimhan
Model Clause
14
In the result set, the user desired column name can be
displayed by using aliasing "as" in the dimension.
Dr. Girija Narasimhan
Model Clause
15
Part 5- Dimension by
Expression
Dr. Girija Narasimhan
Model Clause
16
It is possible to use expression in the dimension component.
In the given query, value of the ord column is multiplied by 10. So,
column value 3 is displaying as 30.
Dr. Girija Narasimhan
Model Clause
17
Part 6-sql model clause
Measures
Dr. Girija Narasimhan
Model Clause
18
Measure is a data column of the table.
It is similar to measure in the star schema based
fact table.
Generally measures have numeric based values
like cost or amount.
Each cell or column mentioned in the measures is
accessed by specifying its full combination of
dimensions.
Dr. Girija Narasimhan
Model Clause
19
Dr. Girija Narasimhan
Model Clause
20
Like dimension it is possible to write expression in the
measure column also.
Dr. Girija Narasimhan
Model Clause
21
Part 7-sql model clause
Partition by
Dr. Girija Narasimhan
Model Clause
22
The Oracle data warehousing describes
partition as a logical block of the result set.
It is similar to how partition in the
analytical functions.
Each partition is viewed by the formula
mentioned in the partition by component
and treated as an independent array.
Dr. Girija Narasimhan
Model Clause
23
Dr. Girija Narasimhan
Model Clause
24
Part 8-sql model clause
Rules
Dr. Girija Narasimhan
Model Clause
25
In the model clause, rules hold the expressions that
assign values to measures.
A rule is an assignment statement whose left side
represents a cell or a range of cells and whose right
side is an expression involving constants, bind
variables or individual cell or aggregate function.
There are three terms used in rules namely
cell reference, dimension reference, cell assignment.
Dr. Girija Narasimhan
Model Clause
26
Dr. Girija Narasimhan
Model Clause
27
The term "newsal" is called a "cell reference, Cell references (i.e
newsal) can only refer to measure cells, not dimension cells.
The dimension reference is part between the square bracket [] in
the cell reference
When a cell reference is used as the assignment target on the
left side of a rule equation is called cell assignment.
newsal[1]=100
Cell reference ,it
refers measures
Dimension
reference
Cell
Assignment
Dr. Girija Narasimhan
Model Clause
28
Part 9-sql model clause
Rules
create new row
Dr. Girija Narasimhan
Model Clause
29
The RULES clause also used to create
new rows in the result set
Dr. Girija Narasimhan
Model Clause
30
Adding values to newly created row
It is also possible to add values to newly
created row by using Rules Clause
Query Result
Select ord,time,sales from
salesorder
Where location=’Sohar’ and
prodno=1
Model
dimension by(ord)
Measures(time,sales)
Rules(time[17]=2002,sales[17]=8);
ORD TIME SALES
---------- ---------- ----------
3 2001 6
5 2000 1
7 2001 8
17 2002 8
Dr. Girija Narasimhan
Model Clause
31
Part 10-sql model clause
RETURN UPDATED ROWS
Dr. Girija Narasimhan
Model Clause
32
Suppose in the previous query the entire row those satisfying the condition
location = Sohar and prodno=1. But the output will show newly created row or
inserted row by using rule clause, then use “return updated rows”. Then it will
display only the newly created row.
Dr. Girija Narasimhan
Model Clause
33
Part 11-sql model clause
RETURN All ROWS
By default “return all rows” is used in the model queries Rules clause. Generally if it
is mentioned as return all rows also it will display both updated or non-updated
rows also.
Dr. Girija Narasimhan
Model Clause
35
Part 12-sql model clause
Not use same column in
dimension and measure
Same column for both a dimension and a measure are used in the given below query
i.e "ord" column used in both measure and dimension. Therefore it is giving the error
message.
Dr. Girija Narasimhan
Model Clause
37
Part 13-sql model clause
NULL not allowed in DIMENSION
BY or MEASURES clauses
Null value not allowed in dimension. Because, in general dimension have primary
key column name. So, it doesn't have null values. If null values are allowed then it
is difficult to identify the cell i.e. a reason null value not allowed in the dimension.
So, it is giving error message.
Empty String (' ')
Part 14-sql model clause
Empty string also not allowed in both dimension and measure.
The purpose of the dimension and measure gives multi-
dimensional based result set based on given column values.
Then value is empty, the purpose is not fulfill. So, it is giving
error message of empty string or empty column values.
Using For Loop
Part 15-sql model clause
Using Model clause, looping operation is possible. Using For constructs the single formula
can generate multiple formulas with positional references and it is also used to create new
values.
Using For construct can be used for dimension of numeric, date and date time data types.
Increment and decrement expression can be used in numeric dimensions and interval for
dimensions are used date or date time data types. In the below query dimension has
order id is numeric data type. Here it creates the new value to column Test.
OER UNIT 5 SQL MODEL CLAUSE
ITERATION
Part 15-sql model clause
For repeating the rules for execution need iterate feature. In this example, sales [19] ||
8 using rules creating new values for sales [19] and assigning value 8. This value will be
execute exactly 5 times given as per condition in iterate (5) in sales [19].
Iteration using until Clause
Part 15-sql model clause
The UNTIL clause is used in the iterate feature for checking at the end of each and every
iteration. It shows iterated rules applied and executed at least once. It also do early
termination based on condition given in the UNTIL clause, because in this below
example iterate (4) times is given. But actually it is doing only one execution of the
iteration because until condition is specified with value 8. So, it do early termination.

More Related Content

PDF
Mysql Optimization
PPTX
MYSql manage db
DOCX
10053 - null is not nothing
PDF
Bt0075 rdbms with mysql 2
DOCX
Not in vs not exists
PPTX
MYSQL using set operators
PPTX
MYSQL single rowfunc-multirowfunc-groupby-having
PPT
Part36 parameter,form success
Mysql Optimization
MYSql manage db
10053 - null is not nothing
Bt0075 rdbms with mysql 2
Not in vs not exists
MYSQL using set operators
MYSQL single rowfunc-multirowfunc-groupby-having
Part36 parameter,form success

What's hot (20)

PPTX
What is Outlier Analysis and How Can It Improve Analysis?
PPTX
Outlier
PPT
IBM Informix Database SQL Set operators and ANSI Hash Join
PPT
Common table expressions
PDF
Discover the power of Recursive SQL and query transformation with Informix da...
PPTX
SQL(database)
PPTX
Chapter 6 database normalisation
PPTX
How mysql choose the execution plan
DOCX
The internals
ODP
SQL Tunning
PPT
3.4 selection sort
ODP
Oracle SQL Advanced
DOCX
Visual basic bt0082
PDF
PDF
Excel Solver(By Mahsa Rezaei)
PPT
SQL subquery
PDF
Effective Unit Test Style Guide
PDF
MA3696 Lecture 9
PPT
Intro to tsql unit 11
PDF
Sql subquery
What is Outlier Analysis and How Can It Improve Analysis?
Outlier
IBM Informix Database SQL Set operators and ANSI Hash Join
Common table expressions
Discover the power of Recursive SQL and query transformation with Informix da...
SQL(database)
Chapter 6 database normalisation
How mysql choose the execution plan
The internals
SQL Tunning
3.4 selection sort
Oracle SQL Advanced
Visual basic bt0082
Excel Solver(By Mahsa Rezaei)
SQL subquery
Effective Unit Test Style Guide
MA3696 Lecture 9
Intro to tsql unit 11
Sql subquery
Ad

Similar to OER UNIT 5 SQL MODEL CLAUSE (20)

PPTX
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
PPT
VB_ERROR CONTROL_FILE HANDLING.ppt
PDF
MySQL Query And Index Tuning
PPTX
Part3 Explain the Explain Plan
PPTX
ADV Powepoint 3 Lec.pptx
PPT
06 procedures
PPT
The Database Environment Chapter 8
PDF
Oracle_Analytical_function.pdf
PPTX
MS SQL SERVER: Microsoft sequence clustering and association rules
PPTX
MS SQL SERVER: Microsoft sequence clustering and association rules
PDF
Sql ch 5
PDF
MySQL Performance Optimization
PPTX
Advanced functions in PL SQL
PDF
Advanced MySQL Query Optimizations
PDF
5. Group Functions
PPTX
Ground Breakers Romania: Explain the explain_plan
PDF
C Languages FAQ's
DOCX
MSc COMPUTER APPLICATION
PPTX
Stored procedures
PDF
50 MS Excel Tips and Tricks
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VB_ERROR CONTROL_FILE HANDLING.ppt
MySQL Query And Index Tuning
Part3 Explain the Explain Plan
ADV Powepoint 3 Lec.pptx
06 procedures
The Database Environment Chapter 8
Oracle_Analytical_function.pdf
MS SQL SERVER: Microsoft sequence clustering and association rules
MS SQL SERVER: Microsoft sequence clustering and association rules
Sql ch 5
MySQL Performance Optimization
Advanced functions in PL SQL
Advanced MySQL Query Optimizations
5. Group Functions
Ground Breakers Romania: Explain the explain_plan
C Languages FAQ's
MSc COMPUTER APPLICATION
Stored procedures
50 MS Excel Tips and Tricks
Ad

More from Girija Muscut (20)

PPTX
Tamil Nalvar
PPTX
Visualization using Tableau
PDF
Introduction to ml
PDF
Effective Visualization with Tableau
PPTX
Guruvayoor song with audio-Udayasthamana puja
PPTX
Lakshmi lalli with audio
PPTX
Bagyada laskhmi purandara dasa
PPTX
Lakshmi lalli
PPTX
Amba nee irangaayenil - papanasam sivan song
PPTX
Mahalakshmi jagan madha - papanasm sivan tamil song
PDF
Sowbhagayaha laskhmi varuvai nee tamil song
PPTX
Bega baro Bega baro Neela Megha Varna-Vadhiraja Theertha
PPTX
Rama Nama Bhajan
PPTX
Saratha devi song 1
PPTX
Saraswathi bhajan 1 with tamil meaning
PPTX
Aneyu karadare -Purandara Dasar.
PDF
Maithriam Bhajatha with tamil meaning (lyrics)
PPTX
Unit 4 scd2-exercise 1-solution
PPTX
Unit 2 - Slowly Changing Dimension Type 1 (SCD1) (insert)
PPTX
Slowly Changing Dimension Type 1 (SCD 1) exercise 2 solution insert and update
Tamil Nalvar
Visualization using Tableau
Introduction to ml
Effective Visualization with Tableau
Guruvayoor song with audio-Udayasthamana puja
Lakshmi lalli with audio
Bagyada laskhmi purandara dasa
Lakshmi lalli
Amba nee irangaayenil - papanasam sivan song
Mahalakshmi jagan madha - papanasm sivan tamil song
Sowbhagayaha laskhmi varuvai nee tamil song
Bega baro Bega baro Neela Megha Varna-Vadhiraja Theertha
Rama Nama Bhajan
Saratha devi song 1
Saraswathi bhajan 1 with tamil meaning
Aneyu karadare -Purandara Dasar.
Maithriam Bhajatha with tamil meaning (lyrics)
Unit 4 scd2-exercise 1-solution
Unit 2 - Slowly Changing Dimension Type 1 (SCD1) (insert)
Slowly Changing Dimension Type 1 (SCD 1) exercise 2 solution insert and update

Recently uploaded (20)

PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PPTX
Computer Software - Technology and Livelihood Education
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
AI Guide for Business Growth - Arna Softech
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Time Tracking Features That Teams and Organizations Actually Need
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
"Secure File Sharing Solutions on AWS".pptx
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PPTX
Cybersecurity: Protecting the Digital World
PPTX
Computer Software and OS of computer science of grade 11.pptx
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PPTX
assetexplorer- product-overview - presentation
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Computer Software - Technology and Livelihood Education
Topaz Photo AI Crack New Download (Latest 2025)
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Oracle Fusion HCM Cloud Demo for Beginners
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
AI Guide for Business Growth - Arna Softech
Patient Appointment Booking in Odoo with online payment
GSA Content Generator Crack (2025 Latest)
Time Tracking Features That Teams and Organizations Actually Need
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
"Secure File Sharing Solutions on AWS".pptx
Autodesk AutoCAD Crack Free Download 2025
CCleaner 6.39.11548 Crack 2025 License Key
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Cybersecurity: Protecting the Digital World
Computer Software and OS of computer science of grade 11.pptx
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
assetexplorer- product-overview - presentation

OER UNIT 5 SQL MODEL CLAUSE

  • 1. Data warehouse Design Using Oracle https://www.oercommons.org/authorin g/edit/21861 Dr. Girija Narasimhan 1 OER- UNIT 5 SQL MODEL CLAUSE
  • 2. Part 1- SQL model clause 2 Dr. Girija Narasimhan Model Clause
  • 3. 3 Dr. Girija Narasimhan Model Clause With the SQL model clause you build one or more matrixes with a variable number of dimensions. This is called the model. The model uses a subset of the available columns from your FROM clause. It contains at least one dimension, at least one measure and optionally one or more partitions create table salesorder(ord number(4) primary key,prodno number(3),suppno number(3),time number(5),location varchar2(20),sales number(6));
  • 4. 4 Dr. Girija Narasimhan Model Clause Ord Prodno Suppno Time Location sales 1 1 1 2000 Sohar 5 2 1 1 2000 Muscat 3 3 1 1 2001 Sohar 6 4 1 1 2001 Muscat 4 5 1 2 2000 Sohar 1 6 1 2 2000 Muscat 7 7 1 2 2001 Sohar 8 8 1 2 2001 Musat 5 9 2 1 2000 Sohar 3 10 2 1 2000 Muscat 8 11 2 1 2001 Sohar 6 12 2 1 2001 Muscat 7 13 2 2 2000 Sohar 9 14 2 2 2000 Muscat 11 15 2 2 2001 Sohar 4 16 2 2 2001 Muscat 3
  • 5. 5 Dr. Girija Narasimhan Model Clause Partition columns Partition columns divide the result set into blocks. Rules defined in the model clause are applied independently of other partitions to each partition. Dimension columns Dimension columns define how cells within a partition can be accessed. Measure columns The columns defined as measures can be assigned new values in the rules section of the model clause.
  • 6. 6 Dr. Girija Narasimhan Model Clause Part 2- Dimension by Unique column
  • 7. Dr. Girija Narasimhan Model Clause 7 Dimension by Unique column Multi dimension column Aliasing Expression
  • 8. Dr. Girija Narasimhan Model Clause 8 In the model clause, the dimension components are used to define multi-dimension array and it is also useful for identifying cells or column within the partition. By default it will identify at least one cell in a partition The dimension components have the column name which has unique value
  • 9. Dr. Girija Narasimhan Model Clause 9 Query Output Select ord, sales from salesorder Where time=2000 model dimension by(ord) measures(sales) rules() order by ord; ORD SALES ---------- ---------- 1 5 2 3 5 1 6 7 9 3 10 8 13 9 14 11 8 rows selected.
  • 10. Dr. Girija Narasimhan Model Clause 10 Column value given in the dimension is not unique then it will give "non unique addressing" error.
  • 11. Dr. Girija Narasimhan Model Clause 11 Part 3- Dimension by Multiple dimension using unique keys
  • 12. Dr. Girija Narasimhan Model Clause 12 It is possible to use more than one dimension column be specified. But all the combination gives the unique row identification
  • 13. Dr. Girija Narasimhan Model Clause 13 Part 4- Dimension by aliasing
  • 14. Dr. Girija Narasimhan Model Clause 14 In the result set, the user desired column name can be displayed by using aliasing "as" in the dimension.
  • 15. Dr. Girija Narasimhan Model Clause 15 Part 5- Dimension by Expression
  • 16. Dr. Girija Narasimhan Model Clause 16 It is possible to use expression in the dimension component. In the given query, value of the ord column is multiplied by 10. So, column value 3 is displaying as 30.
  • 17. Dr. Girija Narasimhan Model Clause 17 Part 6-sql model clause Measures
  • 18. Dr. Girija Narasimhan Model Clause 18 Measure is a data column of the table. It is similar to measure in the star schema based fact table. Generally measures have numeric based values like cost or amount. Each cell or column mentioned in the measures is accessed by specifying its full combination of dimensions.
  • 20. Dr. Girija Narasimhan Model Clause 20 Like dimension it is possible to write expression in the measure column also.
  • 21. Dr. Girija Narasimhan Model Clause 21 Part 7-sql model clause Partition by
  • 22. Dr. Girija Narasimhan Model Clause 22 The Oracle data warehousing describes partition as a logical block of the result set. It is similar to how partition in the analytical functions. Each partition is viewed by the formula mentioned in the partition by component and treated as an independent array.
  • 24. Dr. Girija Narasimhan Model Clause 24 Part 8-sql model clause Rules
  • 25. Dr. Girija Narasimhan Model Clause 25 In the model clause, rules hold the expressions that assign values to measures. A rule is an assignment statement whose left side represents a cell or a range of cells and whose right side is an expression involving constants, bind variables or individual cell or aggregate function. There are three terms used in rules namely cell reference, dimension reference, cell assignment.
  • 27. Dr. Girija Narasimhan Model Clause 27 The term "newsal" is called a "cell reference, Cell references (i.e newsal) can only refer to measure cells, not dimension cells. The dimension reference is part between the square bracket [] in the cell reference When a cell reference is used as the assignment target on the left side of a rule equation is called cell assignment. newsal[1]=100 Cell reference ,it refers measures Dimension reference Cell Assignment
  • 28. Dr. Girija Narasimhan Model Clause 28 Part 9-sql model clause Rules create new row
  • 29. Dr. Girija Narasimhan Model Clause 29 The RULES clause also used to create new rows in the result set
  • 30. Dr. Girija Narasimhan Model Clause 30 Adding values to newly created row It is also possible to add values to newly created row by using Rules Clause Query Result Select ord,time,sales from salesorder Where location=’Sohar’ and prodno=1 Model dimension by(ord) Measures(time,sales) Rules(time[17]=2002,sales[17]=8); ORD TIME SALES ---------- ---------- ---------- 3 2001 6 5 2000 1 7 2001 8 17 2002 8
  • 31. Dr. Girija Narasimhan Model Clause 31 Part 10-sql model clause RETURN UPDATED ROWS
  • 32. Dr. Girija Narasimhan Model Clause 32 Suppose in the previous query the entire row those satisfying the condition location = Sohar and prodno=1. But the output will show newly created row or inserted row by using rule clause, then use “return updated rows”. Then it will display only the newly created row.
  • 33. Dr. Girija Narasimhan Model Clause 33 Part 11-sql model clause RETURN All ROWS
  • 34. By default “return all rows” is used in the model queries Rules clause. Generally if it is mentioned as return all rows also it will display both updated or non-updated rows also.
  • 35. Dr. Girija Narasimhan Model Clause 35 Part 12-sql model clause Not use same column in dimension and measure
  • 36. Same column for both a dimension and a measure are used in the given below query i.e "ord" column used in both measure and dimension. Therefore it is giving the error message.
  • 37. Dr. Girija Narasimhan Model Clause 37 Part 13-sql model clause NULL not allowed in DIMENSION BY or MEASURES clauses
  • 38. Null value not allowed in dimension. Because, in general dimension have primary key column name. So, it doesn't have null values. If null values are allowed then it is difficult to identify the cell i.e. a reason null value not allowed in the dimension. So, it is giving error message.
  • 39. Empty String (' ') Part 14-sql model clause
  • 40. Empty string also not allowed in both dimension and measure. The purpose of the dimension and measure gives multi- dimensional based result set based on given column values. Then value is empty, the purpose is not fulfill. So, it is giving error message of empty string or empty column values.
  • 41. Using For Loop Part 15-sql model clause
  • 42. Using Model clause, looping operation is possible. Using For constructs the single formula can generate multiple formulas with positional references and it is also used to create new values. Using For construct can be used for dimension of numeric, date and date time data types. Increment and decrement expression can be used in numeric dimensions and interval for dimensions are used date or date time data types. In the below query dimension has order id is numeric data type. Here it creates the new value to column Test.
  • 45. For repeating the rules for execution need iterate feature. In this example, sales [19] || 8 using rules creating new values for sales [19] and assigning value 8. This value will be execute exactly 5 times given as per condition in iterate (5) in sales [19].
  • 46. Iteration using until Clause Part 15-sql model clause
  • 47. The UNTIL clause is used in the iterate feature for checking at the end of each and every iteration. It shows iterated rules applied and executed at least once. It also do early termination based on condition given in the UNTIL clause, because in this below example iterate (4) times is given. But actually it is doing only one execution of the iteration because until condition is specified with value 8. So, it do early termination.