esri geodatabase change detection for sql server with a spatial data type
-
Enterprise SQL Server with the spatial data type and tables registered with the geodatabase
-
A table named
ChangeDetectionthat is not registered with the geodatabaseCREATE TABLE [META].[ChangeDetection]( [table_name] [nvarchar](250) NULL, [last_modified] [date] NULL, [hash] [nvarchar](50) NULL, [id] [int] IDENTITY(1,1) NOT NULL )
The first time the tool is run it will update the ChangeDetection table with the table name, the current date, and a hash digest of all of the rows hashes combine. On subsequent runs, it will query the ChangeDetection table for the single hash, rehash the table, compare the results, and then update the last_modified and hash values on the ChangeDetection table if changes were found.
Applications and users that are interested in taking action when data changes can query the ChangeDetection table and inspect the dates that are greater than the last time they checked. For instance, if a process is scheduled to run daily, querying for last_modified dates that equal the current date would result in the set of data to process.
dotnet run cambiador
- edit the
appsettings.jsonfile for the database connection - bump the version in the
cambiador.csproj - build the project into a single file
dotnet publish --runtime win-x64 -c Release /p:PublishSingleFile=true /p:DebugType=None --no-self-contained - deploy the
cambiador.exefile that will be created inbin/release/net9.0/win-64/publishto the place where it will run