lens git commit: LENS-1405 : Add xsd for virtual fact
Repository: lens Updated Branches: refs/heads/master c4cd6d84e -> cf944c10c LENS-1405 : Add xsd for virtual fact Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/cf944c10 Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/cf944c10 Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/cf944c10 Branch: refs/heads/master Commit: cf944c10c7fe68c151e2967612864251a72814ef Parents: c4cd6d8 Author: Rajitha R Authored: Wed Apr 19 12:11:22 2017 +0530 Committer: Amareshwari Sriramadasu Committed: Wed Apr 19 12:11:22 2017 +0530 -- lens-api/src/main/resources/cube-0.1.xsd| 70 .../src/main/resources/virtualfact1.xml | 27 2 files changed, 97 insertions(+) -- http://git-wip-us.apache.org/repos/asf/lens/blob/cf944c10/lens-api/src/main/resources/cube-0.1.xsd -- diff --git a/lens-api/src/main/resources/cube-0.1.xsd b/lens-api/src/main/resources/cube-0.1.xsd index 1d8a624..68ccc13 100644 --- a/lens-api/src/main/resources/cube-0.1.xsd +++ b/lens-api/src/main/resources/cube-0.1.xsd @@ -168,6 +168,76 @@ + + + + +Virtual fact extends fact. It can override the cube of its source fact. It can have different +properties associated with it than its source. +Properties that can be set for a virtual fact are : +- Filters which would be added in query rewriting + + + + + + + Properties that can be set for a virtual fact are + 1. cube.fact.query.where.filter : filter string that needs to be added in WHERE clause. This string would be added as an additional + filter when the query is being constructed in the cube query writing phase. + 2. cube.fact.absolute.start.time: start time of the fact. For queries that ask for time before this, + this fact is not a candidate. Time format can be as you would specify in the time_range_in clause. + i.e. [-mm[-dd[-hh[:MM[:ss[,SSS]] + 3. cube.fact.relative.start.time: Here you can specify fact's relative validity relative to current time. + Useful if you want to specify e.g. this fact is valid for today - 90 days. Can be specified as just + a time difference e.g. "-90 days". Or can be specified in relative syntax. + e.g. now.year or now.day - 6 hour etc. + 4. cube.fact.absolute.end.time: If you're deprecating this fact, put the final date till which the data of + the fact will be valid here. Format same as absolute start time. + 5. cube.fact.relative.end.time: You can specify the end date for fact table + relative to current date e.g. fact table is valid for next 90days starting from today. + This can be specified as just a time difference e.g. "+90 days" + + + + + + + + + The Source fact name over which the Virtual fact is defined. + + + + + + + The base cube's name to which the Virtual fact is associated. + + + + + + + The virtual fact table name. + + + + + + + The weight of the fact table. LENS will use this attribute to decide the lightest table to query when there + are more than one eligible tables. If not defined, the source fact weight would be picked up. + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/lens/blob/cf944c10/lens-examples/src/main/resources/virtualfact1.xml -- diff --git a/lens-examples/src/main/resources/virtualfact1.xml b/lens-examples/src/main/resources/virtualfact1.xml new file mode 100644 index 000..c89a9c5 --- /dev/null +++ b/lens-examples/src/main/resources/virtualfact1.xml @@ -0,0 +1,27 @@ + + +http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="uri:lens:cube:0.1 cube-0.1.xsd "> + + + +
[34/51] [abbrv] lens git commit: LENS-1405 : Add xsd for virtual fact
LENS-1405 : Add xsd for virtual fact Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/cf944c10 Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/cf944c10 Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/cf944c10 Branch: refs/heads/current-release-line Commit: cf944c10c7fe68c151e2967612864251a72814ef Parents: c4cd6d8 Author: Rajitha R Authored: Wed Apr 19 12:11:22 2017 +0530 Committer: Amareshwari Sriramadasu Committed: Wed Apr 19 12:11:22 2017 +0530 -- lens-api/src/main/resources/cube-0.1.xsd| 70 .../src/main/resources/virtualfact1.xml | 27 2 files changed, 97 insertions(+) -- http://git-wip-us.apache.org/repos/asf/lens/blob/cf944c10/lens-api/src/main/resources/cube-0.1.xsd -- diff --git a/lens-api/src/main/resources/cube-0.1.xsd b/lens-api/src/main/resources/cube-0.1.xsd index 1d8a624..68ccc13 100644 --- a/lens-api/src/main/resources/cube-0.1.xsd +++ b/lens-api/src/main/resources/cube-0.1.xsd @@ -168,6 +168,76 @@ + + + + +Virtual fact extends fact. It can override the cube of its source fact. It can have different +properties associated with it than its source. +Properties that can be set for a virtual fact are : +- Filters which would be added in query rewriting + + + + + + + Properties that can be set for a virtual fact are + 1. cube.fact.query.where.filter : filter string that needs to be added in WHERE clause. This string would be added as an additional + filter when the query is being constructed in the cube query writing phase. + 2. cube.fact.absolute.start.time: start time of the fact. For queries that ask for time before this, + this fact is not a candidate. Time format can be as you would specify in the time_range_in clause. + i.e. [-mm[-dd[-hh[:MM[:ss[,SSS]] + 3. cube.fact.relative.start.time: Here you can specify fact's relative validity relative to current time. + Useful if you want to specify e.g. this fact is valid for today - 90 days. Can be specified as just + a time difference e.g. "-90 days". Or can be specified in relative syntax. + e.g. now.year or now.day - 6 hour etc. + 4. cube.fact.absolute.end.time: If you're deprecating this fact, put the final date till which the data of + the fact will be valid here. Format same as absolute start time. + 5. cube.fact.relative.end.time: You can specify the end date for fact table + relative to current date e.g. fact table is valid for next 90days starting from today. + This can be specified as just a time difference e.g. "+90 days" + + + + + + + + + The Source fact name over which the Virtual fact is defined. + + + + + + + The base cube's name to which the Virtual fact is associated. + + + + + + + The virtual fact table name. + + + + + + + The weight of the fact table. LENS will use this attribute to decide the lightest table to query when there + are more than one eligible tables. If not defined, the source fact weight would be picked up. + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/lens/blob/cf944c10/lens-examples/src/main/resources/virtualfact1.xml -- diff --git a/lens-examples/src/main/resources/virtualfact1.xml b/lens-examples/src/main/resources/virtualfact1.xml new file mode 100644 index 000..c89a9c5 --- /dev/null +++ b/lens-examples/src/main/resources/virtualfact1.xml @@ -0,0 +1,27 @@ + + +http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="uri:lens:cube:0.1 cube-0.1.xsd "> + + + +