Loading data into a geodatabase
With Production Mapping, you can load data into a geodatabase using a template that corresponds to the data model or product specification you are using. This template, called a cross-reference database, contains mapping information between the data being loaded (the source workspace) and the database into which the data is being loaded (the target workspace). The cross-reference database contains the names of the source and target feature classes, as well as the WHERE clauses that determine which features are loaded into the feature classes based on subtypes.
Learn more about the cross-reference database
Using the Data Loader tool, you can load data from one geodatabase, coverages, or set of shapefiles into another geodatabase that may or may not have the same schema. This can append data to existing databases or load it into an empty schema. The target workspace must contain the schema referenced in the cross-reference database, at a minimum.
The loading process is completed in a series of steps that are presented in a wizard. The first part of the process requires you to navigate to the cross-reference database, the source workspace, the target workspace, and an output location for the log file that is created. This sets up the mapping information between the data that is going to be loaded and the database into which the data is going to be loaded. The log file is generated as a text file that contains the results of the loading process for each subtype.
The next part of the process is to choose the feature classes that are going to be loaded into the target database. You can choose to load either all or only some of the features from the source workspace. You can choose to perform all the dataset mappings located in the cross-reference database or only a subset. The list in the Data Loader wizard is dependent on the DatasetMappings table in the cross-reference database, not the actual feature classes contained in the source or target.
The last part is actually loading the data. After the data is loaded, a log file of the results is also generated that allows you to see the number of features that have been loaded.
Before using the Data Loader, it is recommended that you do the following:
- Verify that the datasets listed in the SourceDatasets and TargetDatasets tables match the feature classes in the source and target workspace.
- Verify that the fields listed in the SourceFields and TargetFields tables match the fields in the source and target workspaces.
- Validate the source and target workspaces against the cross-reference database using the Preload Validate tool.
- Start ArcCatalog.
- On the main menu, click Customize > Toolbars > Production Mapping.
-
Click the Data Loader button on the Production Mapping toolbar.
The Data Loader dialog box appears.
-
Click the ellipsis (…) next to the Select cross-reference database field.
The Select cross-reference database dialog box appears.
-
Navigate to the appropriate cross-reference database.
Cross-reference databases for each product specification can be found in the Program Files\ESRI[SolutionName]\Desktop 10.0\[ProductName]\[SpecificationName]\DataConversion directory.
-
Click Add.
The path to the cross-reference database appears in the Select cross-reference database field.
-
Click the ellipsis (…) next to the Select source workspace field.
The Select source workspace dialog box appears.
- Navigate to the geodatabase that contains the data you want to load.
-
Click Add.
The path to the source workspace appears in the Select source workspace field.
-
Click the ellipsis (…) next to the Select target workspace field.
The Select target workspace dialog box appears.
- Navigate to the database into which you want to load the data.
-
Click Add.
The path to the target workspace appears in the Select target workspace field.
-
Click the ellipsis (…) next to the Select log file field.
The Specify log file dialog box appears.
- Navigate to the directory in which you want to store the log file.
-
Type a name for the file in the Name text box and click Save.
The path to the log file appears in the Select log file field.
-
Click Next.
The Data Loader dialog box appears with the names of the source and target feature classes and the where clauses for each subtype.
注意:To sort the feature classes by name, click the Source Dataset or Target dataset column headers. This displays them in descending or ascending order based on their names.
-
Check the check boxes next to the feature classes you want to load into the target workspace.
You can also click Select All or Clear All to check or uncheck all the check boxes next to the feature class names.
-
Click Next.
The Data Loader dialog box appears with a summary that shows the cross-reference database, source workspace, target workspace, and log file paths.
-
Click Finish.
The Data Loader window appears with a progress bar that displays the features and subtypes as they are loaded.
When the loading process is finished, a message appears to notify you that loading is complete.
- Click Yes to view the log file or No to close the message and the Data Loader progress window.