Skip to main content

Using Low Code with Databases

To use Microsoft SQL database query via Sauce Labs Low Code:

  1. Connect to the database
  2. Execute a query
  3. Extract the value

Connect to the Database

Connect to db "" with url jdbc:sqlserver://<IP:Port> with user as <username> and password as <password> with db_id <Db_id>.


To connect to db "" with url jdbc:sqlserver:// with user as devops and password test456!@! with db_id test


Db_id is the connection id used by Sauce Labs to identify different DB sessions.

Execute a Query

Syntax: execute query <query> against <Db_id> and save it as <variable name>


Execute query select *from testDB.user against test and save it as query_data

Extract the Value

We can use js or py snippets to parse the output value.


Save:_js{return eval(${query_data})[1][1]} as: fname Where query_data (input):

[[1000, "James", "Bond"], [1001, "Roger", "Federer"], [1002, "Rafael", "Nadal"]] 

Supported Database Versions

Database versions supported out of the box:

  • MySQL 8.0.11
  • MySQL 8.0.22
  • Oracle
  • Oracle
  • SQL Server (2012, 14, 16, 17, 19)
  • SQL Server (2008 R2, 2008)