Get Data Securely(DB)
This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to retrieve data from the Database table specified in the input. The result is stored in the given dynamic variable for further use during test execution.
Syntax
Input Value: <DB IP/instance name/DB file path>;<DB port>;<DB username>;<encrypted DB password>;<DB name>;<Query>;<DB Number/DB Tags>;<querytype/warehouse>(Optional);<schema>(Optional)
<DB IP/instance name/DB file path> (Required)
Provide the Database server location, instance name, or DB file path which you want to use.
<DB port> (Required)
Provide the port number which you want to use to connect to the Database.
<DB username> (Required)
Provide the username which you want to use for Database access.
<encrypted DB password> (Required)
Provide the encrypted password associated with the username.
<DB name> (Required)
Provide the Database name which you want to connect to.
<Query> (Required)
Provide the SQL or Non-SQL query which you want to execute.
<DB Number/DB Tags> (Required)
Provide the Database identifier which you want to use for the connection.
<querytype/warehouse> (Optional)
Provide the data container which you want to target within the Database.
<schema> (Optional)
Provide the schema which you want to use.
Other Related Links:
To learn more about supported Database and there respective Database numbers and Tags, click here.
Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)
<Dynamic Variable> (Required)
This dynamic variable stores the data fetched from the Database.
<Dynamic Variable> (Optional)
This dynamic variable stores the status as True or False.
Example: Retrieving Data from a Database using the Get Data Securely Action
In this example, we explain how to retrieve data from a Database using the provided connection details and query.
Action: Get Data Securely(DB)
Input Value: sp-lively-glitter-a00wuaj6 pooler.eastus.azure.neon.tech;5432;John;FbSveCI31T0LIRLTdqsw==;Student;SELECT * FROM district WHERE district ILIKE 'Rajbari';14
The first argument (sp-lively-glitter-a00wuaj6-pooler.eastus.azure.neon.tech) specifies the Database server hostname.
The second argument (5432) specifies the port number used to establish the Database connection.
The third argument (John) specifies the Database username.
The fourth argument (FbSveCI31T0LIRLTdqsw==) specifies the encrypted password of the Database.
The fifth argument (Student) specifies the Database name.
The sixth argument (SELECT * FROM district WHERE district ILIKE 'Rajbari') contains the SQL query to be executed.
The seventh argument (14) specifies the Database number used for execution.
Output Value: {DB_Data}
The retrieved data from the Database is stored in the {DB_Data} dynamic variable.
If a second output variable is provided, the action returns the status as True or False:
True: If the data is retrieved successfully.
False: If the data is not retrieved successfully.
Logical Explanation: The Get Data Securely(DB) action takes the value from the Input Value column (sp-lively-glitter-a00wuaj6 pooler.eastus.azure.neon.tech;5432;John;FbSveCI31T0LIRLTdqsw==;Student;SELECT * FROM district WHERE district ILIKE 'Rajbari';14). The action establishes a connection using the given Database credentials and executes the SQL query. The retrieved data is stored in the {DB_Data} variable.

Last updated
Was this helpful?