Example of using export to file stream action
- Updated: 2025/10/14
Build an API Task to read data from the database and export the query result into a file stream variable. In this example, we are using the SELECT statement to explain this action.
Note: This action is applicable for both Task Bot and API Task.
Prerequisites
- Create a file variable as dbFileStream.
- You must have a valid database server connection.
- Create a customers database table with the following
records.
cust_id cust_name department baseSalary E1001 Mike Williams Sales 1200000 E1002 John Smith Finance 950000 E1003 Tom Jones HR 700000 E1004 Jack Sheryl Sales 1500000 E1005 Shawn George Operations 650000 - For more information about how to use API Task, see Example: API Task.
To fetch data from the customers table and export into file stream variable, perform these steps: