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: Use the Bulk Load Client Utility to Load the ODS with Sample XML Data
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. Build the Ed-Fi Bulk Load Client
- 2 Step 2. Download Scripts and Sample Data
- 3 Step 3. Create an Empty Sandbox
- 4 Step 4. Update Claim Set to Load Descriptors, Standards and Education Organizations
- 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. Build 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 - Installation Steps.
Within Visual Studio, Open Ed-Fi-ODS\Utilities\DataLoading\LoadTools.sln.
Select Build > Build Solution.
You can verify that the console application has been built by browsing to Ed-Fi-ODS\Utilities\DataLoading\EdFi.BulkLoadClient.Console\bin\Debug\net48\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
The Bootstrap folder is used to load the necessary Descriptors and Education Organization used by the ODS / API. These are automatically included in both the Minimal and Populated Sandboxes. 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 Ed-Fi-ODS-Implementation\Application\EdFi.Ods.SandboxAdmin.Web\AdminCredential.config.
Add an empty sandbox by inserting the below line in the
<sandboxes>element.<sandbox name="Empty Demonstration Sandbox" key="emptyKey" secret="emptySecret" type="Empty" refresh="true" />
Step 4. Update Claim Set to Load Descriptors, Standards and Education Organizations
Execute EnableBootstrapClaimset.sql by opening the file in SSMS and clicking Execute.
EnableBootstrapClaimset.sql
USE [EdFi_Admin] GO UPDATE [dbo].[Applications] SET [ClaimSetName] = 'Bootstrap Descriptors and EdOrgs' WHERE [ApplicationName] = 'Default Sandbox Application Empty' GO
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).
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 EnableSandboxClaimsetAndEducationOrganization.sql by opening the file in SSMS and clicking Execute.
EnableSandboxClaimsetAndEducationOrganization.sql
USE [EdFi_Admin] GO UPDATE [dbo].[Applications] SET [ClaimSetName] = 'Ed-Fi Sandbox' WHERE [ApplicationName] = 'Default Sandbox Application Empty' GO INSERT INTO [dbo].[ApplicationEducationOrganizations] ([EducationOrganizationId], [Application_ApplicationId]) VALUES (255901, ( SELECT [ApplicationId] FROM [dbo].[Applications] WHERE [ApplicationName] = 'Default Sandbox Application Empty')) GO INSERT INTO [dbo].[ApiClientApplicationEducationOrganizations] ([ApiClient_ApiClientId],[ApplicationEducationOrganization_ApplicationEducationOrganizationId]) SELECT [ApiClients].[ApiClientId], [ApplicationEducationOrganizations].[ApplicationEducationOrganizationId] FROM [dbo].[ApiClients] CROSS JOIN [dbo].[Applications] INNER JOIN [dbo].[ApplicationEducationOrganizations] ON [Applications].[ApplicationId] = [ApplicationEducationOrganizations].[Application_ApplicationId] WHERE [ApiClients].[Name] = 'Empty Demonstration Sandbox' AND [Applications].[ApplicationName] = 'Default Sandbox Application Empty'; GO
Step 7. Run the Bootstrap Script to Load Sample Data
Open a PowerShell session.
Navigate to Ed-Fi-SampleDataLoad directory (e.g., C:\Ed-Fi-SampleDataLoad).
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.