List of Exercises
Using the Snapshot Utility - Attended Mode
Start the Snapshot Utility in Attended Mode
Open a command shell and navigate to \Ed-Fi-ODS\Utilities\TemporalOds\EdFi.Ods.Tods.ConsoleApp\bin\Debug
Launch EdFi.Ods.Tods.ConsoleApp.exe (no parameters)
Follow the prompts to create a connection string
Server name: (local)
Database: EdFi_Ods_Sandbox_populatedSandbox
View the menu options
Create a snapshot interactively
- Select "1" to Create Snapshot Metadata - and follow the prompts
- SnapshotCode: snap1
- SnapshotName: Snapshot 1
- Description: My first snapshot
- SnapshotDate: 2017-01-01
- SnapshotEffectiveDate: 2017-01-01
- SnapshotEndDate: 2017-01-31
Enter "Y" - and verify that snapshot has been created.
Note that the command line arguments are provided. Save this off for later.
- Explore options to List and update Snapshot Metadata (Menu options 2-8) - but don't delete "snap1"!
- Select 9 to Load Snapshot Data and follow the prompts
- Snapshot Code: "snap1"
Bypass: Select "Y" or Enter
Note again that the command line arguments are provided. Save this off for later.
Make some updates to data in the current ODS - so you can see temporal changes
- Connect to SQL Server using SQL Management Studio
- Execute the following SQL - against the EdFi_Ods_Sandbox_populatedSandbox database
USE EdFi_Ods_Sandbox_populatedSandbox GO UPDATE [edfi].Student SET MiddleName = 'UPDATED', EconomicDisadvantaged = 1, LastModifiedDate=GETDATE() WHERE StudentUniqueId = 605704 GO UPDATE [edfi].[StudentAddress] SET City = 'UPDATED' WHERE StudentUSI = 1 GO SELECT StudentUniqueId,MiddleName, EconomicDisadvantaged FROM [edfi].Student WHERE StudentUniqueId = 605704 SELECT StudentUSI, City FROM [edfi].[StudentAddress] WHERE StudentUSI = 1
Using the Snapshot Utility - Unattended Mode
Grab the command lines for your first snapshot
create-metadata --beginDate 2017-01-01 --code snap1 --date 2017-01-01 --description "My first snapshot" --endDate 2017-01-31 --name "Snapshot 1" --connection "Data Source=(local);Initial Catalog=EdFi_Ods_Sandbox_populatedSandbox;Integrated Security=True" load-data --code snap1 --connection "Data Source=(local);Initial Catalog=EdFi_Ods_Sandbox_populatedSandbox;Integrated Security=True"
Edit them to create unattended commands
C:\src\TODS\Ed-Fi-ODS\Utilities\TemporalOds\EdFi.Ods.Tods.ConsoleApp\bin\Debug\EdFi.Ods.Tods.ConsoleApp.exe create-metadata --beginDate 2017-02-01 --code snap2 --date 2017-02-01 --description "My second snapshot" --endDate 2017-02-28 --name "Snapshot 2" --connection "Data Source=(local);Initial Catalog=EdFi_Ods_Sandbox_populatedSandbox;Integrated Security=True"
C:\src\TODS\Ed-Fi-ODS\Utilities\TemporalOds\EdFi.Ods.Tods.ConsoleApp\bin\Debug\EdFi.Ods.Tods.ConsoleApp.exe load-data --code snap2 --connection "Data Source=(local);Initial Catalog=EdFi_Ods_Sandbox_populatedSandbox;Integrated Security=True"