A newer version of the Ed-Fi ODS / API is now available. See the Ed-Fi Technology Version Index for a link to the latest version.
How To: Load the ODS with Sample XML Data using Bulk Load Client Utility
This article uses the core sample data released with Ed-Fi Data Standard v3.3.1-b. If you have an extension that extends core entities with additional required fields, the core sample data may fail to fulfill those additional requirements and fail to load.
This article describes the steps needed to populate an Ed-Fi ODS with sample XML data, using the Ed-Fi Bulk Load Client utility.
The steps can be summarized as:
- 1 Step 1. Install the Ed-Fi Bulk Load Client
- 2 Step 2. Download Scripts and Sample Data
- 3 Step 3. Create an Empty Sandbox
- 4 Step 4. Create API Client for Empty Sandbox
- 5 Step 5. Run the Bootstrap Script to Load Descriptors, Standards and Education Organizations
- 6 Step 6. Update Claim Set to Load Sample Data
- 7 Step 7. Run the Bootstrap Script to Load Sample Data
Detail on each step follows.
Step 1. Install the Ed-Fi Bulk Load Client
Ensure that you have an instance of the Ed-Fi ODS / API running locally that has been set up following the Getting Started - Source Code Installation.
Ensure .NET Core 3.1 SDK is installed.
Add Ed-Fi package source by running the following command in Powershell:
if (-not [Net.ServicePointManager]::SecurityProtocol.HasFlag([Net.SecurityProtocolType]::Tls12)) { [Net.ServicePointManager]::SecurityProtocol += [Net.SecurityProtocolType]::Tls12 } if(-not (Get-PackageSource -ProviderName NuGet | Where-Object -Property Name -eq "Ed-FiAzureArtifacts")){ Write-Host "Registering Ed-Fi Package Source..." Register-PackageSource -Name Ed-FiAzureArtifacts ` -Location "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json" ` -ProviderName NuGet Write-Host "Ed-Fi package source configured" }Install the Ed-Fi Bulk Load Client from a PowerShell prompt using the following command:
Install the Ed-Fi Bulk Load Client
mkdir {YourInstallFolder} dotnet tool install EdFi.Suite3.BulkLoadClient.Console --version 5.3.6 --tool-path {YourInstallFolder} # You can invoke the tool using the following command: EdFi.BulkLoadClient.Console # Tool 'edfi.suite3.bulkloadclient.console' (version '5.3.6') was successfully installed.You can verify that the EdFi.BulkLoadClient.Console.exe is available by browsing to this location {YourInstallFolder}\EdFi.BulkLoadClient.Console.exe
Step 2. Download Scripts and Sample Data
Download and Extract Ed-Fi-SampleDataLoad.zip to a local folder. We recommend C:\Ed-Fi-SampleDataLoad.
Ed-Fi-SampleDataLoad.zip contains all the scripts and directory structure used in this how-to article.Download the Sample XML to Ed-Fi-SampleDataLoad\Sample XML
Download the Descriptors to Ed-Fi-SampleDataLoad\Bootstrap
Move the following files from Ed-Fi-SampleDataLoad\Sample XML to Ed-Fi-SampleDataLoad\Bootstrap
Standards.xml
EducationOrganization.xml
CreditCategoryDescriptor.xml
IndicatorDescriptor.xml
IndicatorGroupDescriptor.xml
IndicatorLevelDescriptor.xml
ProgramCharacteristicDescriptor.xml
The Bootstrap folder is used to load the necessary Descriptors and Education Organization used by the ODS / API. Since they require a special claimset (enabled in Step 4, below) they must be loaded separately from the other sample files.
Step 3. Create an Empty Sandbox
Open a PowerShell session.
Navigate to \Ed-Fi-ODS-Implementation\ directory
Execute .\Initialize-PowershellForDevelopment.ps1 and then Reset-EmptySandboxDatabase.
The script will create EdFi_Ods_Sandbox_Empty Database.
Step 4. Create API Client for Empty Sandbox
Execute CreateApiClientforEmptySandbox.sql against the EdFi_Admin database. This will create claims needed to access EdFi_Ods_Sandbox_Empty ODS.
Step 5. Run the Bootstrap Script to Load Descriptors, Standards and Education Organizations
Open a PowerShell session.
Navigate to Ed-Fi-SampleDataLoad directory (e.g., C:\Ed-Fi-SampleDataLoad).
Open the LoadBootstrapData.ps1 file in notepad or Windows PowerShell ISE and update the $apiLoaderExe variable Value where EdFi.BulkLoadClient.Console is installed in Step 1.
Example $apiLoaderExe= "{YourInstallFolderFullPath}\EdFi.BulkLoadClient.Console.exe"
Save and Execute LoadBootstrapData.ps1.
The script will run the Bulk Load Client loading data from the Bootstrap folder to the Empty Sandbox Database.
Step 6. Update Claim Set to Load Sample Data
Execute EnableSandboxClaimset.sql against the EdFi_Admin database. This will change the claim set for the empty sandbox database you created in Step 4 to the Ed-Fi Sandbox claimset.
Step 7. Run the Bootstrap Script to Load Sample Data
Restart the instance of the Ed-Fi ODS / API running locally again to refresh the claims.
Open a PowerShell session.
Navigate to Ed-Fi-SampleDataLoad directory (e.g., C:\Ed-Fi-SampleDataLoad).
Open the LoadSampleData.ps1 file in notepad or Windows PowerShell ISE and update the $apiLoaderExe variable Value where EdFi.BulkLoadClient.Console is installed in Step 1.
Example $apiLoaderExe= "{YourInstallFolderFullPath}\EdFi.BulkLoadClient.Console.exe"
Save and Execute LoadSampleData.ps1.
The script will run the Bulk Load Client to load data from the Sample XML folder to the Empty Sandbox Database.
The following link contains the scripts and directory setup used in this how-to article.
The following GitHub links contain the sample XML files and the as-shipped Ed-Fi Descriptor XML.