Skip to main content

Hi all,

 

I'm trying to detect the changes between the on premise data (SQL Server 2017) and AGOL (ArcGIS Online) data. The schema is the same, of course the field types are slightly different.

 

 

I've noticed that ChangeDetector is constantly reporting a large number of changes, and closer inspection highlighted the problem, that the GEODATABASE_SDE reader into the sql server is reporting that the datime2 field type (CreatedAt) is of type date in FME reader, and is actually truncating the data into the date only.

 

 

So if let's consider a single record:

FME reads it

 

from AGOL: 20190101000000

 

from DB: 20190101

SQL Server reads it as 2019-01-01 00:00:00.0000000

 

 

Hence reporting is as a change.

 

 

How can I force the reader to use datetime2 instead of just date?

I'm not sure you can do it directly in the reader, but you could use a DateTimeFormatter transformer to convert all dates to the same format. Then the ChangeDetector should pick up the dates as unchanged.


I'm not sure you can do it directly in the reader, but you could use a DateTimeFormatter transformer to convert all dates to the same format. Then the ChangeDetector should pick up the dates as unchanged.

Incidentally, I found recently that Shapefile and Geodatabases don't have the concept of midnight. That's probably why 000000 gets dropped (or never stored at all). It's treated as a time-less date for Esri formats.


I'm not sure you can do it directly in the reader, but you could use a DateTimeFormatter transformer to convert all dates to the same format. Then the ChangeDetector should pick up the dates as unchanged.

I'm going through the very same thing myself, and found the same solution, before your ChangeDetector change all dates/datetimes to FME DateTime format and afterwards change them back to FME time format to write out, PLUS what I had to do was use CoordinateRounder to force 3 decimal places only to all geometry otherwise ChangeDetector would find differences at the subatomic scale.


Thanks guys. I came to the same conclusion, use another transformer, I'm just trying to add as few as possible.


Reply