IsRevision="true"
).SELECT * FROM data WHERE lastchanged > @revision
@revision
) inside the PS command?Source
type of the SetParameter
-config?IsRevision="true"
).SELECT * FROM data WHERE lastchanged > @revision
@revision
) inside the PS command?Source
type of the SetParameter
-config?Schema example:
<Class Name="User">
<Properties>
</Property>
<Property Name="WhenUpdated" DataType="DateTime" IsRevision="true" AccessConstraint="ReadOnly">
Posh example:
<CustomCommand Name="Get-User">
....
$response = Invoke-RestMethod -Method Get -Uri $url.ToString()
Add-Member -InputObject $response -MemberType NoteProperty -Name 'WhenUpdated' -Value ([datetime]::Parse($response.lastChanged))
$response
Thanks for the answer Niels de Groot . My question is not how to configure the revision propery (that part works), but how to use the last stored revision date in the query like
<CustomCommand Name="Get-User"> params( [Parameters()] [DateTime] $revisionDate # how to get the information here, so I can use it as a filter argument below ) $response = Invoke-RestMethod -Method Get -Uri -Headers @{"lastupdated" = $revisionDate} $url.ToString() $response
in order to prefilter the data from the source system.
You could get the "revisionDate" by a scripted variable.
Dim revisionDate As String = args.QueryDatabase( _
Connection.SystemQuery _
.From("DPRRevisionStore") _
.Select("RevisionDate").Filter(UID_DPRRevisionStore='guid of the targetsystem/schematype entry' )) _
.Result.First.GetValue("RevisionDate").AsString
Return revisionDate
I'm still unsure if your plan is feasible, the sync engine has it's own matching logic and operations.
But keep me informed!