Document toolboxDocument toolbox

About CSV Import

Use CSV Import to import IP AM data (networks, network containers) through Grid Manager. You can use this feature to migrate or add new data, overwrite existing data, or merge new data with existing data. Only superusers can perform CSV imports and exports.
To import new data, you must first prepare a data file (include all required fields and follow the proper syntax), and then start an import through Grid Manager. You can also export existing data to a data file, modify the data, and then import the modified data to the database. You can either overwrite existing data with the modified data or merge new data with the existing data. For more information abut CSV import, refer to the Infoblox CSV Import Reference.
To import a data file:

  1. Create a data file if you do not already have one, as described in 19282683.
  2. Configure import options. For information, see 19282683.

When you submit multiple CSV imports, the appliance puts the import jobs in queue and executes them one at a time in the order they are submitted. When a job is being executed, it is in the Import in progress state. When a job is in queue for execution, it is in the Import pending state. You can import multiple CSV files at a time, but at any given time you can execute only one single task. Note that only one task at a time will be in the Import in progress state, while the others are in the Import pending state. You can view the status of each import job through CSV Job Manager. To access CSV Job Manager, from the Data Visualization tab, click CSV Job Manager from the Toolbar and select Jobs Manager, click CSV Import in the IPAM Task Pack.
You can do the following in CSV Import:

  • Add, override, merge, or custom data through the imported CSV file, as described in 1928268319282683
  • Verify the content in the CSV file, as described in 19282683.
  • View a list of CSV import jobs, as described in 19282683
  • Add and start CSV import jobs, upload data files, stop CSV imports, or edit the options of the uploaded file, as described in 19282683
  • Delete uploaded jobs, as described in 19282683.
  • Download the following: imported files, import errors, import results, or snapshots, as described in 19282683
  • Select a pending or saved job, and then click the Cancel icon to cancel the job.
  • Click the Refresh icon to refresh the CSV Job Manager.

Note: The list of CSV import jobs are not restored when you restore a backup file or when you promote a master candidate.


CSV Import Limitations

Ensure that you understand the following limitations before you start an import:

  • You can import multiple CSV files at a time, but at any given time you can execute only one single task. The import tasks are queued. Note that only one task at a time will be in the Import in progress state, while the others are in the Import pending state.
  • Do not use UTF-8 characters in the CSV file name.
  • When you perform a CSV import that includes objects that have scheduled changes or updates associated with them, the import fails.
  • When you stop an import, the appliance completes the import of the data row it is currently processing before it stops the import. You cannot resume the import from where it stopped.
  • You cannot roll back to previous data.
  • Only editable data can be imported.
  • When you promote a new Grid Master during an import, the import stops; and it does not restart on the new Grid Master. When a failover occurs during an import, the import stops on the old active node, and it does not restart on the new active node.
  • When a CSV import starts, the appliance validates the first 100,000 rows of data in the CSV file. If the file contains more than 100,000 rows of data, the appliance validates the rest of the data as the import progresses.
  • The appliance supports up to one million rows of data in each CSV import.
  • Use the delete function to delete import jobs that are uploaded. You can delete the content of a CSV file that you have imported to the database. Note that you cannot delete jobs that are already imported.
  • If you upload a file and preview the file using the Preview option, and later update the content of the same CSV file, and then try to view the edited file using the same Preview wizard, you may not be able to see the changes. Infoblox recommends that you start a fresh CSV import to upload the edited file and navigate to the Preview wizard to preview the file.


Configuring Import Options

You can import CSV files and perform various operations to update the data in the database. You can choose from several import options: add, override, merge, and custom. You can add new rows from the imported file to the database, overwrite existing rows in the database, append rows to the existing rows in the database, delete existing rows in the database, or replace the existing rows in the database. You can verify whether the data in the imported file is appropriate using the Test option before you import the file to the database. You can also view the results and progress details of the operation.
To import a CSV file, complete the following:

  1. From the Data Visualization tab, click CSV Job Manager from the Toolbar.
  2. In the CSV Job Manager wizard, select CSV Import and click the New CSV import job icon.
  3. In the New CSV Import Wizard, complete the following:
    Type of Import
    For all supported objects
  • Add: Select this to add new rows from the imported CSV file to the database. NIOS updates the database with the new data that you have added to the imported CSV file and retains the rows that do not have any changes.
  • Override: Select this to overwrite the existing data in the database with the data from the uploaded file. You cannot add new rows or delete existing rows. If you want to overwrite values in the required fields, you must include the required fields and the corresponding _NEW_XXXX fields in the data file.
  • Merge: Select this to add values from the imported CSV file to the existing columns in the database that do not have any data. It does not overwrite the existing data, even if the data file contains new values for certain fields. If you want to overwrite values in the required fields, you must include the required fields and the corresponding _NEW_XXXX fields in the data file.
  • Delete: Select this to delete the rows in the imported CSV file from the database.
  • Custom: Select this to apply custom import actions for individual data rows in your CSV file. When preparing the CSV file for import with the Custom option, add an IMPORT-ACTION column to the file and specify a custom import action for each data row. Use the following abbreviations for import actions: 'I' (INSERT), 'M' (MERGE), 'O' (OVERRIDE), 'IM' (INSERT+MERGE), 'IO' (INSERT+OVERRIDE), 'D' (DELETE).

    Note: The replace operation might affect system performance if you try to replace a zone with a lot of changes. Infoblox recommends that you perform the replace operation for large import files (more than 10,000 rows of changes) during non-peak hours. This operation ignores _new_XXX fields in the imported CSV files.

     4. Click Next to import the CSV file.

    • Import Type: Displays the type of import option you have selected.
    • Select the CSV file that you want to import and click Choose.
      On Error: Select one of the following to tell the appliance what to do when it encounters an error during an import:
    • Stop import: Select this to stop the data import once it encounters an error in the uploaded file. Grid Manager displays the row number at which it stops the import when it encounters an error. NIOS saves the changes made to the CSV file before an error occurs. For example, if there are 100 rows of data and you select this option, and there is an error in row 90, the appliance displays 90 of 100 completed, 1 error.
    • Skip to the next row and continue: Select this to skip over errors and continue the data import. You can download an error report to identify the erroneous data. NIOS displays the total number of rows it has processed by skipping over. For example, if there are 100 rows of data and you select this option, the appliance displays 100 of 100 completed, 1 error.

     5. Click Next to preview your CSV file. In the File Preview table, Grid Manager displays the header row, the first six rows, and up to 15 columns of the imported data. You cannot edit the data here. Field names with asterisks (star) indicate required fields. Note that you must define these fields in the imported file. If any of the required fields are missing, the appliance generates an error during the import operation. You can do the following in this wizard:

    • Import type: The type of import option you have selected.
    • File name: The name of the CSV file you have selected.
    • Separator: Select a separator for your CSV file from the drop-down list. The default value is Comma.
    • On Error: The option you have selected.

      6. Click Test to verify the content in your CSV file. Click Yes in the Test CSV Import for Replace Operation dialog box to verify the content or click No to cancel the operation. NIOS automatically analyzes the data in the imported file for any syntax errors or other violations. You can also view a detailed report of the file that you are importing. Note that you can run the test as a background task. This report also displays information about the number of deleted, updated and added files. It also displays error messages, if any. NIOS generates a results file listing the file name, action performed, date and time, result, and the number of failures at the end of the validation. You can view the results file only after the replace operation is complete.


Note: The Test button is enabled only when you select the Replace operation and is disabled for other import options.


     7. Click Import to import the CSV file to the database. Click Yes in the dialog box to import the CSV file or No to cancel the operation.

     8. You can view the progress and results of your import operation in the CSV Import Progress wizard. This wizard displays the following information:

    • Import type: The type of import option you have selected.
    • File name: The name of the CSV file you have selected.
    • Separator: The separator you have selected for your CSV file. The default value is Comma.
    • On Error: The option you have selected when the import operation encounters an error.
    • Current status: If an import is in progress, this field displays its current status. Otherwise, it displays the date and time of the last import.
    • Last action: Displays the last operation and the admin who initiated it.
    • Rows Completed: The number of rows of data the import has processed. Depending on the import options, Grid Manager displays either the row number at which it stops an import when it encounters an error or the total number of rows it has processed by skipping over the erroneous data. For example, if there are 100 rows of data and you select "On error: Stop importing," and there is an error in row 90, Grid Manager displays 90 of 100 here. If you select "On error: Skip to the next row and continue," Grid Manager displays 100 of 100 here and displays 1 in Rows with Errors.
    • Rows with Errors: The number of rows of data the import has detected errors. Click Download Errors to download the CSV file that contains the fields and the rows of erroneous data. You can use this report as a reference to update the data file before you import the file again.

To cancel the import operation, click Stop Import before the operation is complete. To close the wizard and execute the operation in the background, click Close & Run in Background. When the operation is complete, you can click Download errors to download and view the errors. The Download errors button is enabled only if the operation encounters errors. Click Save & Close to save the operation and close the wizard.

Viewing CSV Import Jobs

You can view the status of import jobs. To view the status:

  1. From the Data Visualization tab, click CSV Job Manager from the Toolbar.
  2. In the CSV Job Manager wizard, click CSV Import. Grid Manager displays the following information about the import jobs that were submitted in the past 30 days:
    • User Name: The admin user who submitted the CSV import.
    • Status: The current status of the import job. The status can be one of the following:
      • Import successful: The import is completed without errors. Check the Message field for information about the import.
      • Import unsuccessful: The import is completed, but with errors. Check the Message field for information about the error message.
      • Import pending: The job is in queue for execution.
      • Import in progress: The job is being executed.
      • Import stopped: The job has been stopped. You can select the job and restart the import.
      • Test successful: Test is completed without errors. Check the Message field for information about the test.
      • Test unsuccessful: Test is completed, but with errors. Check the Message field for information about the error message.
      • Test pending: Test is in queue for execution.
      • Test in progress: Test is in progress.
      • Test stopped: Test has been stopped. You can select the job and restart the import.
      • Saved file: The data file has been uploaded, but the import has not started.

        Note: After a product restart, which can be caused by a failover, all Import in progress jobs go into Import stopped state; all Import pending jobs continue to be queued for execution.

        Submitted: The timestamp when the job was submitted.
      • Completed: The timestamp when the job was completed. This field is blank if the job has not been completed yet.
      • File Name: The CSV data file name.
      • Message: This field displays the number of rows of data that have been processed and the number of rows of data the import has detected errors. Depending on the import options, Grid Manager displays the row number at which it stops the import when it encounters an error, or the total number of rows it has processed by skipping over the erroneous data. For example, if there are 100 rows of data and you select "On error: Stop importing," and there is an error in row 90, the appliance displays 90 of 100 completed, 1 error. If you select "On error: Skip to the next row and continue," the appliance displays 100 of 100 completed, 1 error.
      • File Size: The size of the imported CSV file.

Modifying CSV Import Jobs

You can modify the options of the CSV file that you have already uploaded, delete the jobs that are uploaded, or download uploaded file or error file. After you configure the import options, you can select a data file and start an import operation or upload a data file. For more information about configuring import options, see 19282683 19282683.
To edit the options of a file, complete the following:

  1. From the Data Visualization tab, click CSV Job Manager from the Toolbar.
  2. In the CSV Job Manager wizard, select CSV Import and select the import job that you want to update, click the Action icon and select Edit.
  3. In Edit - CSV Import Job, select a type of import and perform the operations mentioned in 19282683 19282683
  4. Click Download to download the uploaded file, snapshot file, or the results file. For more information, see 19282683
  5. Click Save & Close to save the changes.


Deleting Uploaded Jobs

You can delete import jobs that are uploaded. You cannot delete jobs that are already imported. You can delete the content of a CSV file that you have imported to the database. Note that the CSV import files and the backed up files are saved for a period of 30 days, but the size limit is set to 1 GB. If these files increase in size, NIOS removes the older files from the Grid. NIOS generates a syslog message if it encounters an error when generating the backup file.


Note: When you delete a parent object from the CSV file, the child objects associated with the parent objects are also deleted.


To delete uploaded jobs, complete the following:

  1. From the Data Visualization tab, click CSV Job Manager from the Toolbar.
  2. In the CSV Job Manager wizard, select CSV Import and select the import job that you want to delete, click the Action icon and select Delete or click the Delete pending job icon.
  3. Click Yes to delete the uploaded job or No to cancel the operation in the Cancel Import Job wizard.

Downloading Files

You can download various types of files based on the import operation that you have selected. You can download the following files: uploaded, error, results, and snapshot. Superusers can download the original imported file.

Downloading Uploaded or Error Files

You can download CSV files that are already uploaded or download error files to check the errors that the import operation encountered. The download options are valid for all import operations, except replace. To download the file, complete the following:

  1. From the Data Visualization tab, click CSV Job Manager from the Toolbar.
  2. In the CSV Job Manager wizard, do one of the following:
    • Select CSV Import and select the import job that you want to download, click the Action iconand select Download.
    • In the CSV Job Manager wizard, select CSV Import and select the import job that you want to download, click the Action icon and select Edit. Click the arrow beside the Download option and select one of the following:
      • Uploaded File: Select this to download the uploaded CSV import file.
      •  Error File: Select this to download the error file. This option is enabled only if the import operation encountered an error.

You can export these files to your local system.

Creating a Data File for Import

If you are migrating new data into the database, you must prepare the data file using the correct format and syntax before you can import it successfully. You must include all the required fields and understand the dependencies among some of the fields. You can create one CSV file to update data of multiple object types (Network and Network Container), as illustrated in 19282683. In this example, you define the field names you want to modify for the two object types in rows 1 and 2. You then include the corresponding data as shown in rows 3 to 4. For detailed information about CSV Import, refer to the Infoblox CSV Import Reference.

Table 1.1 CSV File Example 1


A

B

C

D

E

1

HEADER-MGMNETWORK

GRID*

NETWORK_VIEW*

ADDRESS*

CIDR*

2

HEADER-IS_Container

DISABLED

COMMENT

EA-<VALUE>


3

NETWORK

SubGrid

Default

10.176.80.255

24

4

True

True


EA-Site1



Exporting New CSV Jobs
You can use the Global CSV Export Wizard to export multiple objects at once. You can export network containers and networks to a single CSV file through Grid Manager.
To export network containers and networks data:

  1. From the Data Visualization tab, click CSV Job Manager from the Toolbar.
  2. In the CSV Job Manager wizard, click CSV Export. Click the New CSV Export job icon and specify the following in the Global CSV Export Wizard:
    • Separator: Select a separator from the drop-down list: Comma, Semicolon, Space, and Tab.
    • All Objects: The checkbox is selected by default. When you select this checkbox, all networks are selected by default.
    • Network: Select this checkbox to select all networks and network containers that are listed.
  3. Click Export Data to start the export process. In the Start global CSV Export dialog box, click Yes to confirm or click No to cancel the process.
  4. Grid Manager displays the CSV export progress and results in the CSV Global Export progress dialog box. It displays the following information:
    • Separator: The separator used in the CSV file.
    • Approximate number of objects to be exported: Indicates the total number of objects to be exported.
    • Number of objects exported: Indicates the total number of objects that are exported.
    • Current status: Indicates the current status of the export process.
  5. Click Close to exit.

Managing CSV Export Jobs

You can view the list of CSV export operations using the CSV Job Manager.

  1. From the Data Visualization tab, click CSV Job Manager from the Toolbar. In the CSV Job Manager wizard, click CSV Export.
  2. Grid Manager displays the following information:
    • User Name: The admin user who submitted the CSV export. Only superusers can view this column.
    • Status: The current status of the export job. The CSV export process runs in an asynchronous mode similar to the CSV import. The status can be one of the following:
      • Export pending: The job is in queue for execution.
      • Export running: The job is being executed.
      • Export stopped: The job has been stopped. You can select the job and restart the export.
      • Export completed: The export is completed without errors. Check the Message field for information about the export.
      • Export failed: The export is completed, but with errors. Check the Message field for information about the error message.
    • Submitted: The timestamp when the job was submitted.
    • Completed: The timestamp when the job was completed. This field is blank if the job has not been completed yet.
    • Failed Description: The appliance displays the error message in the Failed Description column if the CSV export fails. You cannot start a failed CSV export task.
    • File Size: The size of the generated CSV file.

Completed CSV export jobs are deleted 30 days from the date of submission. You can also perform the following operations:

  • Select a completed CSV export task and download the exported file.
  • Cancel or stop a pending CSV export task using the Delete option.
  • Purge all export tasks after an upgrade or restore.
  • Start a new global CSV export job.

Modifying CSV Export Jobs

You can cancel an export job that is in progress or download an exported job. You can also schedule new export jobs. The appliance deletes the CSV jobs that are completed after 30 days from the date of submission.
To update an exported job or delete one:

  1. From the Data Visualization tab, click CSV Job Manager from the Toolbar.
  2. In the CSV Job Manager wizard, click CSV Export.
  3. Select the export job that you want to update, click the Action icon . Click Cancel to cancel the export job that is in progress. You can also click the Cancel job icon to delete the file. Click Download file to download the exported file. For more information, see 19282683.
  4. Click the New CSV Export job icon to export a new job. For more information, see 1928268319282683
  5. Click Close to exit.