Hi,
Have powershell script which gives info on refreshes workspace, dataset name, report name, date of refresh.
However, looking for the gateway the reports refresh under as we have a few gateways.
How can we best report the associated gateway used in these refreshes.
Thanks
# filter out 'report usage metrics model' dataset - always there
foreach ($ds in ($datasets | Where-Object { $_.Name -ne "Report Usage Metrics Model"}) )
{
Write-Verbose "Dataset: $($ds.Name)"
# successful refreshes
$historyItems += Get-RefreshHistory -Workspace $ws -Dataset $ds -Scope $Scope -Top $Top |
Where-Object {$_.serviceExceptionJSON} |
Select-Object -Property id, refreshType, startTime, endTime, status, serviceExceptionJson, `
@{n='WorkspaceName';e={$ws.Name}}, @{n='WorkspaceId';e={$ws.Id}}, @{n='DatasetName';e={$ds.Name}}, @{n='DatasetId';e={$ds.Id}},`
@{n='ErrorCode';e={""}}, @{n='ClusterUri';e={""}}, @{n='ActivityId';e={""}}, @{n='RequestId';e={""}}, @{n='Timestamp';e={""}}
# failing refreshes
$historyItems += Get-RefreshHistory -Workspace $ws -Dataset $ds -Scope $Scope -Top $Top |
Where-Object {-not ($_.serviceExceptionJSON)} |
Select-Object -Property id, refreshType, startTime, endTime, status, @{n='serviceExceptionJson';e={$null}},`
@{n='WorkspaceName';e={$ws.Name}}, @{n='WorkspaceId';e={$ws.Id}}, @{n='DatasetName';e={$ds.Name}}, @{n='DatasetId';e={$ds.Id}},`
@{n='ErrorCode';e={""}}, @{n='ClusterUri';e={""}}, @{n='ActivityId';e={""}}, @{n='RequestId';e={""}}, @{n='Timestamp';e={""}}
}