I need to create new .dat file by fetching the data stored in database by running a process model. I looked into the smart services but couldn't find anything helpful. How can we create a .dat file with all the details?
Discussion posts and replies are publicly visible
I just need a couple of details.
1. Are you looking to create a binary .dat file or a text-based one?2. What structure do you want the data to have in the .dat file?
1. I need to save text-based data, which is basically the data fetched from the database table.
2. The structure should be the data rows where the data is separated by | and rows are separated by || or a new line.
1. Start by fetching the required data using a record or data store entity. Then, structure the data as needed. For example:
2. Utilize the "Text Doc from Template" smart service. Pass a template document containing a single key, such as "###DATA###." To create a .dat file, follow these steps:
2. Utilize the "Text Doc from Template" smart service. Pass a template document containing a single key, such as "###DATA###." To create a "dat file", follow these steps:
How much data are we talking about? Do you need to run this frequently?
You could create a text file, change the extension to "dat" and add a simple placeholder like this "###data###", then you can use the smart service "text from template" to write data in whatever format you like. As you might want to write this in batches, you can just add the same placeholder as the last line, and repeat that step.