How to get Column names along with data in the Database to get printed

Hi All, I’m new to the forum and to Katalon Automation. I have a requirement to automate the SQL toad database. I have few keywords which helps me in printing the required data from the DB, but as per the latest requirement, I was asked to print the entire DB(column names with data) in DB format. Do anyone have keyword for this? Kindly help. Thanks in advance!

Have a look at Groovy tutorial, 4.4 Fetching metadata. It shows you how to get column names of a DB table.

Or if you are using the “Data-Driven Testing” feature in Katalon and want to print the column names observed through Katalon API, you should look at the following API:

https://docs.katalon.com/javadoc/com/kms/katalon/core/testdata/TestData.html#getColumnNames()

1 Like