PowerShell DMT BAQ Export doesn't produce the *.CompleteLog.txt file

I have begun exporting datasets from DMT using a PowerShell script. It appears to work but I’m not seeing the corresponding *.CompleteLog.txt file that should come with it. I can see that there are command line switches to turn these logs off but I’m not using those switches. Shouldn’t the log be in the same folder as the -Target by default?

Here is the command that is being executed:

Start-Process -Wait -PassThru -FilePath $DMTPath -ArgumentList "-sso -Export -BAQ $BAQName -Target $source -NoUI"

Are you sure you have the correct command line args? I dont recall it having -Target, but -Source and I dont recall it having -Export but -ExportData

What do you get on DMT.exe /?

EDIT
Looks like those are new flags in 700.x+ Nice!

The command I am using produces a CSV file with BAQ data at the -Target location.

If I switch the -Export to -ExportData and -Target to -Source I get the following error:

2021-09-07T15:33:07 DMT Error: System.Exception
Provide a valid commandline parameters to execute with -NoUI mode. Valid commandline parameters with NoUI are: [ -Import, -Export, -PlayList, -PlayBook ]

If I had to guess the CompleteLog.txt is only for -Add, -Update or -Delete – Perhaps a BAQ Export doesnt contain it because the baq csv or xml would basically indicate its completion?

1 Like

Thanks. Maybe that is the case. I might be looking for something that doesn’t exist.

1 Like

I get them only with imports, not exports.

1 Like

In conclusion, if you want to look for errors from an -Export job you need to look for files called DMT_*_Error.log

Like this:

If (Test-Path -Path "$ExportPath\DMT_*_Error.log" -PathType Leaf) {