Anaplan Connect Export Record Count
Hi,
Using Anaplan Connect, when exporting a list is there a way to capture the number of records exported?
When importing into Anaplan the record count is available but not for exporting.
Thanks.
Best Answer
-
Hi,
you can add this code in your script to count the number of rows:
setlocal EnableDelayedExpansion
set "myvar=findstr /R /N "^^" "my_file.csv" | find /C ":""set numheaders=5
for /f %%a in ('!myvar!') do set mycount=%%a
set /A finalcount=%mycount%-!numheaders!
echo %finalcount%Regards
1
Answers
-
0
-
I don't think you you can, directly.
Because running an export generates a file, the API response for running an export is limited to:
"{ "meta" : { "paging" : { "currentPageSize" : 1, "offset" : 0, "totalSize" : 1 }, "schema" : "https://api.anaplan.com/2/0/models/2785AAF56C504633B8ED187F045315C1/objects/task" }, "status" : { "code" : 200, "message" : "Success" }, "tasks" : [ { "taskId" : "C61B36AA14B64CB1A0651035D8AD9CED", "taskState" : "COMPLETE", "creationTime" : 1588774876988 } ] }"
So you would have to count the number of lines in the file generated
2 -
Thanks, I was leaning towards doing something similar to this.
0 -
If you use the -emd option in Anaplan Connect just before the export, it should give you expected column and row counts that can be extracted. Be aware that another user could cause rows to be added/removed between -emd and export execution, though. Having this information in the task result sounds like a worthwhile enhancement.
0