Help Centre › Building Processes
This article describes the RPA Database functionality to list columns of a database table.
For a full list of available functions, please read DATABASE functions.
Description
The List columns function returns column metadata for a specified database table, including each column's name, data type, whether it is nullable, and its default value.
Setting it up
To use the List columns function, follow these instructions:
{{popups:rpas/add:action=db-list-columns}}
Once on a process map:
- Navigate to the process where you would like to add the List columns function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the List columns option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Name | Yes | Text | - | The alias of a previously opened connection (from db-connect) |
| Table | Yes | Text | - | The table name to retrieve column metadata for |
| Schema | No | Text | - | The schema the table belongs to |
| Variable | No | Text | columns | Variable name to store the column metadata |
Output variables
| Variable | Type | Description |
|---|---|---|
| {columns} | Array of dictionaries | Column metadata, where each dictionary contains: name, type, nullable, default |
Errors
| Error | Description |
|---|---|
| Connection not found | No open connection exists with the specified name |
| Table not found | The specified table does not exist in the database |
Tips
- Use this action to validate table structure before performing bulk insert or import operations
- The output can help you build dynamic queries based on available columns