Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

Bulk Temporal Data will now be accepted by the Ed-Fi Console Bulk Loader.  Bulk Operations now support new parameters used for the creation of snapshot metadata.  Ed-Fi Bulk XML representing an ODS snapshot can be loaded using the Bulk Loader.  When accompanied by temporal metadata, the Bulk Loader targets the new temporal staging ODS (see 45780511 Databases section below), triggers a snapshot of that data, then populates the T-ODS. 

Bulk Loading Temporal Data

To run the Bulk Loader with temporal features, first ensure you have checked out a version of the codebase containing these features:

  • Check out the following Github feature branches:
    • Ed-Fi-ODS/f-TODS-Segment2
    • Ed-Fi-ODS-Implementation/f-TODS-Segment2
    • Ed-Fi-Common/f-TODS-Segment2
  • Open PowerShell and navigate to the Ed-Fi-ODS-Implementation path
  • Run the command .\Initialize-PowershellForDevelopment.ps1 to initialize PowerShell for development.

  • Run the command initdev

  • Open EdFi.Ods.sln project (C:\Git\Ed-Fi-ODS-Implementation\Application\)

    • Select Build > Build Solution

  • Set the startup project

    • In the solution explorer, right click on the EdFi.Ods.Tods > Entry Points > BulkLoad > EdFi.Ods.BulkLoad.Console 

    • Set this as the startup project

  • At Command Prompt navigate to ...\Ed-Fi-ODS-Implementation\Application\EdFi.Ods.BulkLoad.Console\bin\Debug\EdFi.Ods.BulkLoad.Console.exe
  • Supply bulk load and additional temporal snapshot parameters and hit enter

Snapshot Mode 

The current Ed-Fi Bulk Load pipeline will often require a workaround using incremental loading of bulk files.  This is due to load failures arising as a result of missing dependent data. The T-Bulk console supports incremental loads using Incremental mode. This allows a user to load the bulk files incrementally, domain by domain, in order to ensure dependencies are in place in the temporal staging database as data is loaded. Alternatively, users might choose to load a full set of bulk files repeatedly until all dependency issues are resolved and the temporal staging database accurately reflects the load that was submitted.  When the temporal staging database is finally loaded and ready for snapshotting, the user will execute the snapshot using SnapshotIncremental mode. 

Temporal Command-Line Parameters

The following parameters have been added in support of loading temporal data.  If no temporal parameters are supplied the Console initiates a standard (non-temporal) bulk load operation.

Excerpt


Temporal

Parameter

command line shortcut

Required/

Optional

Default if not providedFormat/ExampleBusiness Logic
SnapshotDate 
/y
RequiredSet to Effective Begin Date"yyyy-MM-dd"
SnapshotBeginDate 
/b
RequiredDoes not Default. Must be provided by user"yyyy-MM-dd"
SnapshotEndDate 
/e
Optional
"yyyy-MM-dd"
SnapshotForceOverwrite
/o
Optional
flag (Included = true, not included = false)
  • If ForceOverwriteSnapshot flag is true and matching snapshot is found and all other validations pass - snapshot is overwritten, any changed metadata is updated, and snapshot is re-initialized.
SnapshotName 
/n
Required"Bulk Snapshot yyyy-MM-dd""Name of Snapshot"
SnapshotDescription 
/l
Optional
"Long Description of Snapshot"
SnapshotCode 
/s
Required"BulkSnapshotyyyy-MM-dd""Code"
SnapshotMode
/p
Optional"Full""Full",
"Incremental" or
"SnapshotIncremental"
  • If running in Full, clear "EdFi_TemporalOds_Staging1" db, load all bulk files and perform snapshot as originally designed.
  • If running in Incremental, do not clear temporal staging data at the beginning, run the bulk load as normal, do not run LoadSnapshotData or clear temporal staging data at the end.
  • If running in SnapshotIncremental, do not clear temporal staging data at the beginning, skip the bulk load calls, run LoadSnapshotData only and then clear temporal staging data.



Databases

When initiating a temporal bulk load, data is loaded and staged in a database preloaded with Types but otherwise empty, called "EdFi_TemporalOds_Staging1" this database is created at build time.  The temporal bulk process clears out this database at the completion of the snapshot.

The landing place for the temporal data is the T-ODS associated with the target ODS database indicated using the the “Connection String” (/c) parameter provided. This database must conform to the same database schema that was used to generate the Bulk Loader application.

Usage 

Bulk Load Populated Template Data as Temporal Snapshot

Note
titleNotes
  • Multiple simultaneous bulk loads are not supported.
  • SQL Server installations not supporting SQL database snapshot feature (SQL Server Standard Edition 2012 and prior) must update a configuration value in App Settings by setting the bypassSqlServerSnapshot flag to "true".
  1. Set up a manifest file per the instructions on How To: Use the Ed-Fi Console ODS Bulk Loader/wiki/spaces/ODSAPI24/pages/21693249
  2. Open Command window and navigate to Ed-Fi-ODS-Implementation\Application\EdFi.Ods.BulkLoad.Console\bin\Debug\EdFi.Ods.BulkLoad.Console.exe
  3. Enter parameters similar to the example below and hit enter 
    1. Note that parameters after the Manifest location /m are temporal parameters

Code Block
languagepowershell
themeConfluence
titleTemporal Bulk Parameter Example
\Ed-Fi-ODS-Implementation\Application\EdFi.Ods.BulkLoad.Console\bin\Debug\EdFi.Ods.BulkLoad.Console.exe /c "Database=EdFi_Ods_Populated_Template; 
Data Source=(local); Persist Security Info=True; Trusted_Connection=True" /f "C:\Temp\BulkLoad\PopulatedTemplateBulkLoad\Data" 
/m "C:\Temp\BulkLoad\PopulatedTemplateBulkLoad\Manifest.xml" /s "snap1" /n "Snapshot 1" /y "2017-02-01" /b "2017-02-01"


Info
titleSnapshot Warnings and Errors
  • When the temporal bulk load and the corresponding snapshot have completed processing, additional errors and warnings are triggered using snapshot features.
    • Processing errors, UDM date inconsistency and other general audit related items related to the snapshot are recorded on the Audit Log, accessible via the T-ODS Snapshot Utility using the List AuditLog command.
    • Snapshot Completeness can be verified using the Snapshot Utility by running the List CountLog command. This provides you with comparison counts of data points from the bulk loaded snapshot against the current data in the ODS.



DRAFT NOTES (to be removed)
This content can be fragmentary because it will likely be rolled into existing bulk documentation for the ODS / API. Make the draft documentation complete enough to do acceptance testing, and highlight/bold new material; IC or the Alliance will weave that new content into the live documentation when appropriate.
RequirementDOC-06
AudienceTechnical & Dev / Ops
TypeHow-To Article / Technical Usage Guide
POC ActivityNeeds outline
Due DateTBD


Table of Contents