09. Connect With Salesforce DB Using SOQL
Why Was This Developed?
Salesforce Object Query Language (SOQL) is implemented to support the Salesforce database data.
How Does It Work?
About Object Name: The object name is augmented with the current database. So, as mentioned in the tooltip, we have to pass the object name as the database name.
Refer to the tooltip below:
<DB IP/instance name/DB file path>;<DB port>;<DB username>;<DB password>;<DB name>;<Query>;<DB Number>;<querytype/warehouse>(Optional);<schema>(Optional)
Connection:
Required inputs are:
DB Username
DB Password
SOQL Query
DB type is 15
Example:
Example@avoautomaton.com;Example@1234;Account;SELECT Id, Name, Type, Industry FROM Account;15
GetData:
Example:
Example@avoautomaton.com;Example@1234;Account;SELECT Id, Name, Type, Industry FROM Account;15
Keyword: Get Data(DB)
Description: This keyword or action instructs Avo Assure Client to run a query in the specified database from the input field and save the results in the output variable.
Keyword
Input Syntax
Output Syntax
Supported Input Forma
Get Data(DB)
<DB IP/instance name/DB file path>; <DB port>; <DB username>; <DB password>; <DB name>; <Query>; <DB Number>; <querytype/warehouse>(Optional); <schema>(Optional)
{Variable}
String
Static values
Dynamic variables
Note:
For SOQL Access files, an additional dedicated query is supported. In the input’s ‘query’ argument, the user must specify “getAllTables” (case insensitive) to fetch all the table names in the DB file.
To view the values of the variable, the user should use the following format: {OutputVariableName[2][3]}. This gives the value of the 2nd row and 3rd column.
Find the snippet of the keyword below for accessing a SOQL DB instance:
In the above example, after the test case debug, {sql1[4][2]} variable contains the value from the fourth-row second column of query results obtained from the specified DB.
Some database instances, like SOQL, require either the querytype/Warehouse name or the Schema.
Find the snippet of the keyword below for working with SOQLDB:
Keyword: Verify Data(DB)
Description: This keyword or action instructs Avo Assure Client to run a query in the specified database from the input field and verify the data with the input file.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
Verify Data(DB)
<DB IP/instance name/DB file path>; <DB port>; <DB username>; <DB password>;<DB name>; <Query>; <DB Number>; <file path to verify data>; <Sheet Name>; <querytype/ warehouse>(Optional); <schema>(Optional)
{Variable}
String
Static values
Dynamic variables.
Input file format supported: .xls, .xlsx and .csv
Find the snippet of the keyword below:
In the above example, after the test case debug, based on the comparison between the query result and the content of the specified file, the {status} variable contains the value “True/False”.
Some database instances, like SOQL, require either the querytype/Warehouse name or the Schema.
Find the snippet of the keyword below, for working with SOQLDB:
Keyword: Export Data(DB)
Description: This keyword or action instructs Avo Assure Client to execute a specified query from the input and export the result to an external file.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
Export Data(DB)
<DB IP/instance name/DB file path>; <DB port>; <DB username>; <DB password>; <DB name>; <Query>; <DB Number>; <querytype/ warehouse>(Optional); <schema>(Optional)
<File Path>; <Sheet name>
String
Static values
Dynamic variables
Output file format supported: .csv, .xlsx and .xls
Note: Sheet name is optional.
Find the snippet of the keyword below:
In the above example, after the test case debug, the results from the specified query will be exported to the SOQLDB.xlsx file.
Some database instances, like SOQL, require either the querytype/Warehouse name or the Schema.
Find the snippet of the keyword below, for working with SOQLDB:
Keyword: Run Query(DB)
Description: This keyword or action instructs Avo Assure Client to run the specified input query on the database specified in the input field.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
Run Query(DB)
<DB IP/ instance name/ DB file path>; <DB port>; <DB username>; <DB password>; <DB name>; <Query>; <DB Number>; <querytype/ warehouse>(Optional); <schema>(Optional)
{optional}
String
Static values
Dynamic variables.
Find the snippet of the keyword below:
In the above example, after the test case debug, the execution status (“True/False”) of the specified query will be stored in the output variable {status}.
Some database instances, like SOQL, require either the querytype/Warehouse name or the Schema.
Find the snippet of the keyword below, for working with SOQLDB:
Keyword: Get Data Securly(DB)
Description: This keyword or action instructs Avo Assure Client to run a query in the specified database from the input field and save the results in the output variable. Here, the password in the input field should be AES encrypted.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
secureGetData
<DB IP/ instance name/ DB file path>; <DB port>; <DB username>; <DB Encrypted password>; <DB name>; <Query>; <DB Number>; <querytype/ warehouse>(Optional); <schema>(Optional)
{Variable}
String
Static values
Dynamic variables
Note:
For SOQL Access files, an additional dedicated query is supported. In the input’s query argument, the user must specify “getAllTables” (case insensitive) to fetch all the table names in the DB file.
To view the values of the variable, the user should use the following format: {OutputVariableName[2][3]}. This gives the value of 2nd row and 3rd column.
Find the snippet of the keyword below:
In the above example, after the test case debug, {sql1[4][2]} variable contains the value from the fourth row and second column of query results obtained from the specified DB.
Some database instances, like SOQL, require either the querytype/Warehouse name or the Schema.
Find the snippet of the keyword below for working with SOQLDB:
Keyword: Verify Secure Data(DB)
Description: This keyword or action instructs Avo Assure Client to run a query in the specified database from the input field and verify the data with the input file. Here, the password in the input field should be AES encrypted.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
Verify Secure Data(DB)
<DB IP/ instance name/ DB file path>; <DB port>; <DB username>;<Encrypted DB password>; <DB name>; <Query>; <DB Number>; <file path to verify data>; <Sheet Name>; <querytype/ warehouse>(Optional); <schema>(Optional)
{Variable}
String
Static values
Dynamic variables
File format supported: .xls, .xlsx and .csv
Find the snippet of the keyword below:
In the above example, after the test case debug, based on the comparison between the query result and the content of the specified file, the {status} variable contains the value “True/False”.
Some database instances, like SOQL, require either the querytype/Warehouse name or the Schema.
Find the snippet of the keyword below for working with SOQLDB:
Keyword: Export Data Securly(DB)
Description: This keyword or action instructs Avo Assure Client to execute a specified query from the input and export the result to an external file. Here, the password in the input field should be AES encrypted.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
Export Data Securly(DB)
<DB IP/ instance name/ DB file path>; <DB port>; <DB username>; <Encrypted DB password>; <DB name>; <Query>; <DB Number>; <querytype/ warehouse>(Optional); <schema>(Optional)
<File Path>; <Sheet Name>
String
Static values
Dynamic variables
File format supported: .csv, .xlsx and.xls
Note: Sheet Name is optional.
Find the snippet of the keyword below:
In the above example, after the test case debug, the results from the specified query will be exported to the SOQLDB.xlsx file.
Some database instances, like SOQL, require either the querytype/Warehouse name or the Schema.
Find the snippet of the keyword below for working with SOQLDB:
Keyword: Run Query Securly(DB)
Description: This keyword or action instructs Avo Assure Client to run the specified input query on the database specified in the input field. Here, the password in the input field should be AES encrypted.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
Run Query Securly(DB)
<DB IP/ instance name/ DB file path>; <DB port>; <DB username>; <DB encrypted password>; <DB name>; <Query>; <DB Number>; <querytype/ warehouse>(Optional); <schema>(Optional)
(Optional)
String
Static values
Dynamic variables
Find the snippet of the keyword below:
In the above example, after the test case debug, the execution status (“True/False”) of the specified query will be stored in the output variable {status}.
Some database instances, like SOQL, require either the querytype/Warehouse name or the Schema.
Find the snippet of the keyword below for working with SOQLDB:
How can I get this?
If the user upgrades to the latest version of Avo Assure to 24.1.0, this feature will be available automatically. If you are not part of this particular version, 24.1.0, contact Avoproductsupport@Avoautomation.com to get this version.
Last updated