HI Ganesh,
You can do so in a JS activity.
I have a query activity of which I'm trying to create a file. You can adapt it to your scenario
var query = xtk.queryDef.create(
<queryDef schema="temp:query" operation="select">
<select>
<node expr="@deliveryId"/>
<node expr="@broadLogId"/>
</select>
</queryDef>);
var result = query.ExecuteQuery();
// Create the txt file
var f = new File("/sftp/<customerName>/incoming/MyFolder/myFile.txt");
// Open file on Write mode
f.open("w");
for each (var record in result) {
// Write on the file
f.writeln(record.@deliveryId + "," + record.@broadLogId);
} // end for
// Close file
f.close();
The file has been created on Adobe sFTP inside MyFolder
Regards,
Vipul