Executing Roxie query
In 'Intro to Roxie' online training, we published a function to Roxie and executed it from ws-ECL.
In this scenario, the function didn't accept any parameters - all were defined in the form of local variables within the function and exposed through STORED services.
My question is this:
How do I execute this function from within ECL IDE? During the course of development, I may want to test it at every build stage to ensure correctness and publish to Roxie only when all is well and complete.
Thanks,
Gayathri
In this scenario, the function didn't accept any parameters - all were defined in the form of local variables within the function and exposed through STORED services.
My question is this:
How do I execute this function from within ECL IDE? During the course of development, I may want to test it at every build stage to ensure correctness and publish to Roxie only when all is well and complete.
Thanks,
Gayathri
- Gayathri_Jayaraman
- Posts: 75
- Joined: Wed May 08, 2013 5:03 am
Hi Gayathri,
In the OSS HPCC, you can now publish your query to hTHOR and THOR, and test it in WS_ECL just like you would for ROXIE. Or if you just want to test the query directly in the ECL IDE, add default values to the search parameters like this:
...and then call the function from a builder window or BWR file in your repository folder. For example, I created a file named BWR_TestService, and then in the file simply do this:
Works great! Just remember after testing to reset the STORED definitions back to blanks when you are ready to publish.
In the Advanced ROXIE we also introduce INTERFACES, which help to make these defaults even easier to use and seed.
Regards,
Bob
In the OSS HPCC, you can now publish your query to hTHOR and THOR, and test it in WS_ECL just like you would for ROXIE. Or if you just want to test the query directly in the ECL IDE, add default values to the search parameters like this:
- Code: Select all
STRING15 fname_value := '' : STORED('FirstName');
STRING25 lname_value := 'SMITH' : STORED('LastName');
STRING2 state_value := '' : STORED('State');
STRING1 sex_value := '' : STORED('Sex');
...and then call the function from a builder window or BWR file in your repository folder. For example, I created a file named BWR_TestService, and then in the file simply do this:
- Code: Select all
IMPORT $;
$.PeopleFileSearchService();
Works great! Just remember after testing to reset the STORED definitions back to blanks when you are ready to publish.
In the Advanced ROXIE we also introduce INTERFACES, which help to make these defaults even easier to use and seed.
Regards,
Bob
- bforeman
- Community Advisory Board Member
- Posts: 1006
- Joined: Wed Jun 29, 2011 7:13 pm
Thanks Bob! That clarifies it.
If underlying ECL code changes, does it have to be re-published to Roxie or is it sufficient to just recompile it?
If underlying ECL code changes, does it have to be re-published to Roxie or is it sufficient to just recompile it?
- Gayathri_Jayaraman
- Posts: 75
- Joined: Wed May 08, 2013 5:03 am
If the underlying ECL code changes, yes, the query would have to be republished. If the data behind the query was the only thing that changed, you could use packages to update the data without the need to republish (packages are covered in the Advanced ROXIE online course).
The strategy and best practice for deployment and production is to configure multiple ROXIEs. Use one for development and updating the queries and then periodically they can switch over to use the new cluster.
Regards,
Bob
The strategy and best practice for deployment and production is to configure multiple ROXIEs. Use one for development and updating the queries and then periodically they can switch over to use the new cluster.
Regards,
Bob
- bforeman
- Community Advisory Board Member
- Posts: 1006
- Joined: Wed Jun 29, 2011 7:13 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest