Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
fighting with listing all automation for given owner and I could not find any proper documentation how to use --filter option for automations. Only Qlik CLI help within powershell which is not enough.
Filtering through these attributes should be possible: name, runMode, lastRunStatus, ownerId
qlik automation ls --filter 'ownerId eq 64ec602e1fa6aadd5ef3b73e'
This works for me without an error, but if I check ownerId in output of that command can see different ownerId compared to I used within command above. For some users works well for some does not.
Anyone here has some experience pls?
Thank you!
Like so:
qlik automation ls --filter "ownerId eq ""VQGmdk0qDy1E_yhK7TNsa30s1Cj0QK6n"""
Hi @Levi_Turner , thanks for reply. Not working. I forgot to mention that I tried many versions with single/double quotes, but without any effect. As the command gives me result, but bad one with differen ownerId I suppose it might be defect...
My first post runs fine for me on Windows. You didn't specify the terminal that you're using, but on Mac, this is working:
qlik automation ls --filter "ownerId eq \"VQGmdk0qDy1E_yhK7TNsa30s1Cj0QK6n\""
Using Qlik CLI in powershell downloaded latest from github Releases · qlik-oss/qlik-cli (github.com). So basically, I think I have it working, but I am not sure whether the filter part is correct as I often get different output then expected, see below lines....
@Levi_Turner did you check the ouptut? That used ownerId is the same as ownerId within the output? Why I am asking is the fact, that sometime works for me and it gives me all automations for given ownerId, but sometimes it gives me different ownerId's automations in output than I used in filter param of the command. Very weird behavior. I checked 3 ownerIds - 1 was working fine and 2 was not working fine - checked against Management console list of automations.....
Not when I posted, but I just did. Everything seems fine. Validation code:
$automations = qlik automation ls --limit 1000 | ConvertFrom-Json
$owners = $automations.ownerId
$owners = $owners | Select -Unique
$automation_owners_detail = @()
foreach($owner in $owners) {
$tmp = (qlik automation ls --filter "ownerId eq ""$owner""" --limit 1000 | ConvertFrom-Json)
$automation_owners_detail += $tmp
}
$automations | Export-Csv .\automations.csv
$automation_owners_detail | Export-Csv .\automation_owner_details.csv
Manually interrogating the two CSVs shows the same counts, same automation names, same automation ids:
Hi @Levi_Turner thanks for verification. I run the same command in cmd then in powershell and I got different results for the same query for the same context used.
Command line was working fine and filter works as expected. Powershell command gave me different ownerId even the command run without any error.