How To: Load the TPDM Sample XML Data using Bulk Load Client Utility

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 TPDM Sample XML Data using Bulk Load Client Utility

This article describes the steps needed to populate an Ed-Fi ODS with sample TPDM XML data using the Ed-Fi Bulk Load Client utility. It assumes you have deployed TPDM plugin as described in the article How To: Deploy TPDM As Dynamic PluginThis process works very similarly to How To: Load the ODS with Sample XML Data using Bulk Load Client Utility. Walk through those steps first to get familiar with the process.

The steps can be summarized as:

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 6.0 SDK is installed.

  • Add Ed-Fi package source by running the following  command in PowerShell: 

    Install the Ed-Fi Bulk Load Client

    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

    c:\>mkdir {YourInstallFolder} c:\> dotnet tool install EdFi.Suite3.BulkLoadClient.Console --version 6.0.13 --tool-path {YourInstallFolder} You can invoke the tool using the following command: EdFi.BulkLoadClient.Console Tool 'edfi.suite3.bulkloadclient.console' (version '6.0.13') 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-TPDMDataLoad.zip to a local folder. We recommend C:\Ed-Fi-TPDMDataLoad.
    Ed-Fi-TPDMDataLoad.zip contains all the scripts and directory structure used in this how-to article.

  • Download the Sample XML to Ed-Fi-TPDMDataLoad\Sample XML

  • Download the Descriptors to Ed-Fi-TPDMDataLoad\Bootstrap

  • Move the following files from Ed-Fi-TPDMDataLoad\Sample XML to Ed-Fi-TPDMDataLoad\Bootstrap

    • Standards.xml

    • EducationOrganization.xml

    • CreditCategoryDescriptor.xml

    • IndicatorDescriptor.xml

    • IndicatorGroupDescriptor.xml

    • IndicatorLevelDescriptor.xml

    • ProgramCharacteristicDescriptor.xml

  • Download the TPDM Sample XML to Ed-Fi-TPDMDataLoad\Sample XML\TPDM.

  • Download the TPDM Descriptors to Ed-Fi-TPDMDataLoad\Bootstrap\TPDM.

  • Copy the file TPDM Sample XML\EducationOrganization.xml to the  Ed-Fi-TPDMDataLoad\Bootstrap\TPDM folder:

Note that the TPDM Sample data depends on the Grand Bend, so we are loading them together in this how-to article. 

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. Update Claim Set to Load Descriptors and Education Organizations

  • Execute CreateApiClienforEmptySandbox.sql by executing the file against the EdFi_Admin database using any database query tool. Use the version appropriate to your database.

Step 5. Run the Bootstrap Script to Load Descriptors and Education Organizations

  • Open a PowerShell session.

  • Navigate to Ed-Fi-TPDMDataLoad directory (e.g., C:\Ed-Fi-TPDMDataLoad).

  • 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"

  • For Postgres Only, Please update Key & Secret    "-k", "Empty",  "-s", "emptySecret"

  • Save and Execute LoadBootstrapData.ps1.

    The script will run the Bulk Load Client loading data from the Bootstrap folder to the TPDM Populated Sandbox Database.

Step 6. Update Claim Set to Load Sample Data

  • Execute EnableSandboxClaimset.sql by executing the file against the EdFi_Admin database using any database query tool. Use the version appropriate to your database.

Step 7. Run the Bootstrap Script to Load Sample Data

  • Open a PowerShell session.

  • Navigate to Ed-Fi-TPDMDataLoad directory (e.g., C:\Ed-Fi-TPDMDataLoad).

  • 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"

  • For Postgres Only, Please update Key & Secret    "-k", "Empty",  "-s", "emptySecret"

  • 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.

Downloads

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.

Sample XML
Descriptors

The following GitHub links contain the sample XML files and the as-shipped TPDM Descriptor XML.

TPDM Sample XML
TPDM Descriptors