The Ed-Fi Console Bulk Loader (hereafter called the Loader) is a command-line tool used to initially populate an ODS database with XML data conforming to the Ed-Fi Data Standard. It is built using code generation techniques that take into account the database schema as well as the Ed-Fi XSD Schema definitions and metadata. The Loader can also be used during database initialization to create the Minimal ODS Template database by populating Ed-Fi Descriptors and education organizations into an empty ODS database. The Loader project is called EdFi.Ods.BulkLoad.Console.
The Loader accepts the following command line parameters:
Example Parameter Value
Displays help information
[ none ]
The name of the ODS database to receive the bulk data
The SQL connection string specifying the target database server and user credentials
Data Source=localhost;Initial Catalog=EdFi_Ods_Sample;Integrated Security=True
The path to a folder containing the interchange files referenced by the manifest
The path to a manifest XML file describing the interchange files to load
/h parameter may be used alone. The other four parameters are required when loading data.
The target ODS database must already exist and be accessible using the “Connection String” (
/c) parameter provided. This database must conform to the same database schema that was used to generate the Loader application.
The manifest file is a simple XML document containing a list of the interchange XML files to load. Because files of the same type are loaded in parallel, it is important that files loaded by the same manifest have distinct XML IDs. Large interchange files may show errors when loading due to the highly parallelized nature of the Loader application. Usually, this is resolved by simply re-running the loader with the same settings.
A manifest file takes the following form:
The manifest file elements are described below:
Interchangeselement must exist at the root, and may only be present one time.
Interchangetag may exist more than once, and contains a single
Filenameelement contains the name of the interchange file to be loaded. This may be a long filename. Note that the file must exist in the directory provided by the “Source Folder” (
/f) command line parameter at runtime.
Typeelement contains the case-insensitive class name for the resource to be loaded.
The load order of data is extremely important when creating a populated ODS database from a minimal one. The load order reflected in the “InterchangeOrderMetadata.xml” file (EdFi.Ods.CodeGen/App_Packages/Ed-Fi/Metadata) contains the correct load order information for the ODS database provided in the Ed-Fi repository. The following load order applies:
Ed-Fi ODS Populated Template
The populated template was generated manually with the Loader using sample XML data contained in the public Ed-Fi-Standard GitHub repository (Ed-Fi-Standard\v2.0\Samples\Sample XML).
Ed-Fi ODS Minimal Template
The minimal template is generated dynamically during the build process. The Ed-Fi Descriptors, standards, and education organization sample data are loaded during the "initialize development environment" step of the build process.