Get Data(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 a Database table. 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>;<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.
<DB Password> (Required)
Provide the 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 Action
In this example, we explain how to retrieve data from a Database using the provided connection details and query.
Action: Get Data(DB)
Input Value: ep-lively-glitter-awuj6 pooler.eastus2.are.neon.tech;5472;neondb_owner;npg_6smlQSN2dBw;dvdrenl;SELECT * FROM district WHERE district ILIKE 'Rajbari';14
The first argument (ep-lively-glitter-awuj6 pooler.eastus2.are.neon.tech) specifies the Database server hostname.
The second argument (5472) specifies the port number used to establish the Database connection.
The third argument (neondb_owner) specifies the Database username.
The fourth argument (npg_6smlQSN2dBw) specifies the Database password.
The fifth argument (dvdrenl) 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 (DB) action takes the value from the Input Value column (ep-lively-glitter-awuj6 pooler.eastus2.are.neon.tech;5472;neondb_owner;npg_6smlQSN2dBw;dvdrenl;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?