# Databricks - Select rows action
This action enables you to select rows based on certain criteria defined by a WHERE
condition. Rows from the selected table that match the WHERE
condition are returned as the output of this action.
Select rows action
# Input fields
To use this action, configure the following input fields.
Table name
Select a table from which to select rows. Workato only displays the first 1,000 table names. Enter in the table name if the table you plan to use is not displayed.
WHERE condition
Provide a
WHERE
condition to filter rows. This condition can be as simple as filtering a single record by itsID
.ID = 123
Alternatively, it can be used to select multiple rows based on values in one or more columns.
STATUS = 'closed' and PRIORITY = 1
Complex
WHERE
conditions with subqueries can also be used. Refer to the WHERE condition guide for more information.Parameters
Used in conjunction with your
WHERE
condition to prevent SQL injection. After declaring named bind variables in yourWHERE
input, assign values to these variables using this input field. Learn moreOrder By
Rows returned from this action can be ordered based on the Order by input field. This field is used to change the default ordering of rows from your Databricks database. You can also define the direction of order for each column you wish to order by. The following Order by statement orders rows by
priority
in ascending order followed bycreated_date
in descending order (latest first).PRIORITY ASC, CREATED_DATE DESC
Limit
This input field determines the maximum number of rows to return. The default limit is 100 and capped at a maximum of 50000 rows for a single Select rows action.
Offset
This input field gives you the option to fetch only a page of results from the entire results set. For example, to skip the first 100 rows of the selected results set, input
100
to this field. The default is0
.
# Output fields
This action generates the following output.
rows
JSON Array of objects, each object describes one row of the selected data. Workato displays only the first 10 objects.
rows_count
The number of rows returned.
Last updated: 4/5/2023, 2:25:23 AM