You can translate the question and the replies:

Use VQL to change user id and password on Sharepoint Base Views

I use Custom data source OData2 to connect to Sharepoint. From this Custom Data source, I defined many Base Views. Each Base View represents one Sharepoint List (i.e., Entity Collection). The username and password is stored in each Base View. So if I have 10 Sharepoint List I want to include in my Denodo database, I'd have 1 Custom Data Source (OData2) with 10 Base Views and in each Base View the username and password to connect to the Sharepoint List is defined. The issue is that I have to make a change to the username and password. While going into 10 base views to change the username and password isn't too time consuming, it becomes extremely inefficient when multiple environments need to have the changes made. And, when there are more than 10, it gets even worst. When I look at the VQL for the Base View it has the following format: CREATE WRAPPER CUSTOM bvsharepointlist1 FOLDER = ... DATASOURCENAME = ... PARAMETERS ( ... ... 'User' = ... 'Password' = ... ... ) ... Is it possible to use VQL similar to above to only change the username and password on a base view WITHOUT first dropping the base view? For example something like this? For Base View 1, change username and password to new one. For Base View 2, change username and password to new one. . . . . . For Base View n, change username and password to new one. Notice no drop if exist statements above. If it is possible, what does should be the exact VQL?
user
19-10-2018 10:45:50 -0400

1 Answer

Hi, You can use the ALTER WRAPPER CUSTOM statement to alter the PARAMETERS such as: ``` ALTER WRAPPER CUSTOM <wrapper name> DATASOURCENAME = ... PARAMETERS ( ... ‘User’ = <new_user>, ‘Password’ = <new_password> ... ); ``` Note that the ALTER WRAPPER CUSTOM statement will replace the entire PARAMETERS clause, therefore you would have to write down all the existing parameters within the PARAMETERS clause, then change the ‘User’ and ‘Password’ field. The VQL statement can be executed from the Virtual DataPort Administration Tool > Tools > VQL Shell. You can refer to the [CUSTOM Wrappers](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/generating_wrappers_and_data_sources/creating_wrappers/custom_wrappers#example-of-creating-a-custom-wrapper) section of the Virtual DataPort VQL Guide for more information. Hope this helps!
Denodo Team
22-10-2018 06:00:01 -0400
You must sign in to add an answer. If you do not have an account, you can register here