You can translate the question and the replies:

Need help creating a Base View from a SQL Server Stored Procedure

I have a SQL Stored Procedure which I will use to create a Base View in Denodo. The issue is that the Stored Procedure takes an User-Defined Table type as input parameter. If I select the SP and click Create from Selected I get an error that says the Table type is not supported. If I try to create the Base View from Query I write the following statement in the Query: call [schema].[spname(@tableInput)] After clicking ok I get the next screen to enter the value of @tableInput but I don't know what to enter because tableInput is a table type. Please help
user
10-08-2020 10:48:48 -0400
code

3 Answers

Hi, When creating a base view using the ‘Create From Query’ option, I would provide any possible **sample value**s as the value for interpolation Variable in the dialog that asks us to enter the value of the variable. It is mandatory to provide sample values for the parameters defined as interpolation variables because the server will use these values to query the source and calculate the schema of the new base view. To get more information, you can have a look at the sections [Creating Base Views from SQL Queries](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#creating-base-views-from-sql-queries) and [Paths and Other Values with Interpolation Variables](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/path_types_in_virtual_dataport#paths-and-other-values-with-interpolation-variables) of the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
11-08-2020 07:56:02 -0400
code
Hi, I understand that providing sample values for interpolation variables is mandatory. The problem I have is that I'm not sure how to provide that sample. The type of the input I'm using is a table not a string or an integer. The table type used by the stored procedure as input parameter has 4 columns and I can't find information on how to use interpolation in this case.
user
11-08-2020 11:14:08 -0400
Hi, I can create base view using* 'Create from Query*' option by using values like string or integer as parameter for interpolation variable. Even I can pass multiple values to an interpolation variable. For example, If i want to pass two values:V1 and V2 as value for interpolation variable of the following statement: SELECT * FROM view where field in ('@interpolation_varaiable') Then, I would pass the values as "V1',"V2". But, it is impossible to pass the entire table input as the sample value for intepolation variable. Hope this helps!
Denodo Team
18-08-2020 08:14:29 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here