If your view has been created over a JDBC data source which supports ‘pass-through credentials’, you can apply the CONTEXT clause with USERNAME and PASSWORD parameters to use other credentials to execute the statement.
You can achieve this with the following steps:
* In the ‘Configuration’ > ‘Connection’ tab of the datasource, change the Authentication method to ‘User Pass-through session credentials’
* Open VQL Shell, execute statements with the following syntax:
SELECT * FROM view1 CONTEXT(USERNAME = 'admin', PASSWORD = 'd4GvpKA5BiwoGUFrnH92DNq5TTNKWw58I86PVH2tQIs/q1RH9CkCoJj57NnQUlmvgvvVnBvlaH8NFSDM0x5fWCJiAvyia70oxiUWbToKkHl3ztgH1hZLcQiqkpXT/oYd' ENCRYPTED)
The server will connect to the database of the view with the username ‘admin’ and the password, given that ‘admin’ has the proper privileges granted to the underlying data source.
You can execute the ENCRYPT_PASSWORD stored procedure to encrypt your password.
You may refer to the [CONTEXT Clause](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/queries_select_statement/context_clause/context_clause) section of the Virtual DataPort VQL Guide and [Considerations When Configuring Data Sources with Pass-Through Credentials](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/appendix/considerations_when_configuring_data_sources_with_pass-through_credentials/considerations_when_configuring_data_sources_with_pass-through_credentials) section of the Virtual DataPort Administration Guide for more information.
Hope this helps!