You can translate the question and the replies:

Result of LIST VIEWSTATSUMMARIES in GET_STATS_FOR_FIELD

Hi there I want to refresh the statistics (at the end via scheduler) for those views which have the stats enabled. The refresh can be done with the new GETSTATSFORFIELD like *call GETSTATSFORFIELDS ( 'ATSOURCETHROUGHVDPONLY' ,'myDB' , 'myView' ,null, true false, false, true); * Now, instead of coding this statement for every view manually I want to use the result of the *LIST VIEWSTATSUMMARIES on myDB* and I want to call the GETSTATSFORFIELD for each of those entries, e.g. with a parameter. The output schema of the LIST statement is a list with one column 'name', says the help file https://community.denodo.com/docs/html/browse/6.0/vdp/developer/appendix/output_schema_of_the_list_command/output_schema_of_the_list_command But any statement like *select name as myParam from LIST VIEWSTATSUMMARIES on myDB* or similar does not work. (Would be useful for a parametrized query in a schedule. The *myParam* would be the parameter for the GETSTATSFORFIELD view name) How can I further use the LIST VIEWSTATSUMMARIES?! Cheers
user
26-04-2022 08:29:23 -0400
code

3 Answers

Hello, The LIST VIEWSATSUMMARIES does only return a list as a string in the Administration Tool (not a standard data type), therefore it can not be used as a source in Scheduler. What you would need to do in this case would be to execute the LIST VIEWSATSUMMARIES in the Administration Tool, copy the output and use it as a parameter source in Scheduler selecting as source type "list". Hope this helps!
Denodo Team
29-04-2022 09:06:26 -0400
code
So far so good. But it would be really better that the 'LIST VIEWSTATSUMMARIES' would be a Stored Procedure and would deliver a enummeration.
user
03-05-2022 04:44:32 -0400
Hello, I am able to use the LIST VIEWSTATSUMMARYS as an input for parameters in Scheduler by following those steps: 1. Create a data source in Virtual DataPort, using a JDBC data source of type VDP pointing to itself. 2. Then you would create a base view - one from a query, where you would insert the LIST VIEWSTATSUMMARIES statement. 3. On the view that you created, click in “Options” > “Search Methods” (Wrapper Source Configuration) > Set Delegate SQL Sentence as Subquery to “No”, so that only the LIST VIEWSTATSUMMARIES statement is executed and not turned into a select statement that would not work, so that the LIST command will not be delegated as a subselect. 4. Once you have done that, you should then create a job on Denodo Scheduler where you would insert the call you wrote, where you would insert the call and provide the appropriate mapping from the new base view and the parameter @myview. ``` call GET_STATS_FOR_FIELDS( 'ATSOURCE_THROUGH_VDP_ONLY' ,'myDB' ,'@myview' ,null, true, false, false, true). ``` All should work now! Hope this helps!
Denodo Team
06-05-2022 07:41:19 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here