Database Actions
Learn the database actions available in algoQA for retrieving, verifying, updating, and copying data across SQL, PostgreSQL, MySQL, and MongoDB databases. .
Overview
The following table describes the database actions available in algoQA and their functionalities.
Database Keywords
The following table describes the database actions used in algoQA and their descriptions.
| Keyword | Description |
|---|---|
| Custom-specific parameter for PostgreSQL | Retrieve data from a PostgreSQL database and verify it using a parameterized query.For example, consider a scenario where you have a table called employees, and you want to fetch all records where the department is "Sales." Your query would look like this:PostgreSql_#Query1:-SELECT * FROM employees WHERE department = 'Sales';You can pass the parameter in the preceding format during the Node Configuration.For more information, refer to Adding a Parameter in the Node Configuration. |
| get data from db and verify | Retrieve data from a database and verify it using a parameterized query.For example, consider a scenario for verifying the user details from a database and check that the user information is correctly stored in the database:Accessing the database: Ensure we have a secure connection to our database system.Executing the query: Search for specific user details using their username.Verification: Confirm that the user's details, such as their username, email address, and role, match what we expect.You can pass the parameter in the following format during the Node Configuration: <database>_#Query1:-<add your query>. In this, replace <add your query> with your actual query statement. |
| get data from db and verify in mongodb | Retrieve data from a Mongo database and verify it using a parameterized query.Use the same preceding example, except that you would verify user details from the MongoDB database and check the user information stored in the MongoDB database.You can pass the parameter in the following format during the Node Configuration: Mongodb_#Query1:-<add your query>. In this, replace <add your query> with your actual query statement. |
| verify db data in sql | Verifying data in a database involves running SQL queries to check for the existence of specific data.For example, check if there are any users whose status is 'active' using the following SQL query:SELECT * FROM users WHERE status = 'active';Use this query to verify the presence of active users in the users table. If the query returns any rows, it confirms that there are active users.You can pass the parameter in the following format during the Node Configuration: Sql_#Query1:-<add your query>. In this, replace <add your query> with your actual query statement. |
| update db data in sql | Updating data in a SQL database involves modifying existing records based on specific conditions or criteria.For example, updating a product price in a SQL database. Consider a table named products with columns product_ID, product_name, category, and price. Let's update the price for a product with product_ID = 123.You can pass the parameter in the following format during the Node Configuration: Sql_#Query1:-<add your query>. In this, replace <add your query> with your actual query statement. |
| get date from db and verify datetime (staging) | Retrieve and verify datetime values from a database. You can execute a query that fetches the relevant records and checks if the retrieved dates meet certain criteria.For example, consider a scenario for retrieving user registration dates from a database and verifying whether they are within the last 30 days. Assume that you have a table called users with a column registration_date. Your query might look like this:SELECT * FROM users WHERE registration_date >= NOW() - INTERVAL '30 days';You can pass the parameter in the following format during the Node Configuration: Sql_#Query1:-SELECT * FROM users WHERE registration_date >= NOW() - INTERVAL '30 days'; |
| verify db data in mysql | Verifies database data in MySQL by executing queries to check for specific conditions.For example, consider a scenario to verify if there are any users whose status is "active." To check for active users in a table called users, your query might look like this:SELECT * FROM users WHERE status = 'active';You can pass the parameter in the following format during the Node Configuration: MySQL_#Query1:-SELECT * FROM users WHERE status = 'active'; |
| copied db data in sql | Involves copying specific data from one table to another within a SQL database. The query selects particular columns from a source table and inserts them into a target table, which is useful for reporting or data migration purposes.For example, consider a Table1 containing customer information, and you want to copy specific columns into Table2. To copy customer_name, email, and phone_number, you can execute:INSERT INTO Table2 (customer_name, email, phone_number) SELECT customer_name, email, phone_number FROM Table1;You can pass the parameter in the following format during the Node Configuration: Sql_#Query1:-INSERT INTO Table2 (customer_name, email, phone_number) SELECT customer_name, email, phone_number FROM Table1. |
Related Topics
Was this page helpful?