KEL Compiler Limitation
We are unable to simultaneously have two published and working Roxie queries that use the same entity but access different attributes. Because the KEL compiler generates the index file based on the entity, it uses the same name for the index file. Because the index file has the same name publishing the second query overwrites the file used by the first query rendering the first query inoperable.
Specific example.
KEL code
Generated ECL code that generates index file for query A
NOTE: the persistent filename for the above index is ,~key::KEL::MOD::Drive::UID
Generated ECL code that generates index file for query B
NOTE: the persistent filename for this second index is also ,~key::KEL::MOD::Drive::UID
As a result there is the following error when publish A, then publish B, and then execute A:
Request
Either (1) generate more specific or unique names for persistent indexes or (2) add compiler flag allowing user to specify index file name.
Conclusion
If we cannot publish multiple Roxie queries for a given entity, I do not see how we can use KEL to create our application.
Specific example.
KEL code
- Code: Select all
IMPORT model;
// ROW Based Properties
Drive: => NumPlays := Play(PlayInDrive.drive.UID = Drive.UID):Count;
Drive: => NumPasses := Play(PlayInDrive.play.playtype='PASS' AND PlayInDrive.drive.UID = Drive.UID):Count;
Drive: => PercentPasses := Drive.NumPasses/Drive.NumPlays;
Drive: => Bucket := ROUNDUP(Drive.PercentPasses/0.1);
// Get Histogram Bucket
QUERY: Bucket(DriveIDs) <= Drive(UID IN DriveIDs){Bucket, UID}; // <----------- Query A
// Get Average Delta VF
QUERY: AvgVf(DriveIDs) <= Drive{vfdelta$Drive(UID IN DriveIDs):Ave}; // <----- Query B
Generated ECL code that generates index file for query A
- Code: Select all
SHARED IDX_Drive_UID_Layout := RECORD
KEL.typ.uid UID;
__EE9349._sequence_;
__EE9349._possession_;
__EE9349._quarter_;
__EE9349._time_;
__EE9349._starttime_;
__EE9349._endtime_;
__EE9349._startyard_;
__EE9349._endyard_;
__EE9349._result_;
__EE9349._redzone_;
__EE9349._yardspenalized_;
__EE9349._yardsgained_;
__EE9349._vf_;
__EE9349._vfdelta_;
__EE9349.Bucket_;
END;
SHARED IDX_Drive_UID_Projected := PROJECT(__EE9349,TRANSFORM(IDX_Drive_UID_Layout,SELF.UID:=__T(LEFT.UID),SELF:=LEFT));
EXPORT IDX_Drive_UID := INDEX(IDX_Drive_UID_Projected,{UID},{IDX_Drive_UID_Projected},'~key::KEL::MOD::Drive::UID');
NOTE: the persistent filename for the above index is ,~key::KEL::MOD::Drive::UID
Generated ECL code that generates index file for query B
- Code: Select all
SHARED IDX_Drive_UID_Layout := RECORD
KEL.typ.uid UID;
__EE412._sequence_;
__EE412._possession_;
__EE412._quarter_;
__EE412._time_;
__EE412._starttime_;
__EE412._endtime_;
__EE412._startyard_;
__EE412._endyard_;
__EE412._result_;
__EE412._redzone_;
__EE412._yardspenalized_;
__EE412._yardsgained_;
__EE412._vf_;
__EE412._vfdelta_;
END;
SHARED IDX_Drive_UID_Projected := PROJECT(__EE412,TRANSFORM(IDX_Drive_UID_Layout,SELF.UID:=__T(LEFT.UID),SELF:=LEFT));
EXPORT IDX_Drive_UID := INDEX(IDX_Drive_UID_Projected,{UID},{IDX_Drive_UID_Projected},'~key::KEL::MOD::Drive::UID');
NOTE: the persistent filename for this second index is also ,~key::KEL::MOD::Drive::UID
As a result there is the following error when publish A, then publish B, and then execute A:
- Code: Select all
Exception
Reported by: Roxie
Message: Query test1.1 is suspended because Key layout mismatch detected for index key::KEL::MOD::Drive::UID
Request
Either (1) generate more specific or unique names for persistent indexes or (2) add compiler flag allowing user to specify index file name.
Conclusion
If we cannot publish multiple Roxie queries for a given entity, I do not see how we can use KEL to create our application.
- vin
- Posts: 28
- Joined: Tue Feb 10, 2015 8:12 pm
To publish multiple Roxie queries simultaneously, the queries should be put in one file and compile them together or to put them in different folders and compile them separately. The first one is an better option.
- schen
- Posts: 4
- Joined: Fri Jul 08, 2016 2:35 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest