Exporting the Inventory Data to CSV Format

You can customize the inventory data you want to export from the ZfD Inventory database in to a comma separated value (CSV) file.

You select the inventory components that should be exported, such as the Operating System Name and Version. You can further filter the workstations whose attributes will be exported. For example, you can export only those workstations with a particular processor speed. The Data Export tool will export all workstations satisfying these query conditions into a CSV file.

If you want to reuse the same data export settings for export, you can save the data export configurations.

The following sections will help you use the Data Export tool:


Invoking the Data Export Tool

To invoke the Data Export tool:

  1. In ConsoleOne, click a container.

  2. Click Tools > click Configure DB > select a ZENworks Database object. > click OK.

  3. Click Tools > Data Export.


Exporting the Inventory Data to a CSV File

To export the inventory data to a CSV file:

  1. Open the Data Export tool. See Invoking the Data Export Tool .

  2. Select Create a New Database Query.

    This option lets you add a new query that defines the inventory components such as hardware, software, network, and others that you want to export. You can also specify the criteria to limit the workstations and the database sites to be included in the query. Based on the inventory components and criteria you specify, the inventory data from the database is exported to a CSV file.

    Click Next.

  3. Select the database fields from the list of Database Fields > click Add.

    If you select a group component, all subcomponents of the group are added. For example, if you select the Software component group, the subcomponents of Software such as vendor name, product name, and version are added.

    Click Next.

  4. Specify the filter conditions for workstations > click Edit Query. See Forming the Query and Setting the Filter Conditions .

    Click Next

  5. View the data export settings.

    1. Click Save Configuration to save the configurations settings to an .EXP file > specify the filename for the EXP file > click Save.

      The configuration file (.EXP) contains the settings such as the inventory components you selected, and also the query formed for filtering the workstation data export. You create an .EXP file so that you can reload the configuration settings and generate the .CSV files any time you need to.

    2. Click Next.

  6. Click Perform the Query from This Computer to run the data export processing from the workstation computer. This option will access the Inventory database on the specified database server and export the data in to a CSV file.

    To run the data export tool from a server, click Perform the Query on a Remote Server. See Running the Data Export Program From the Server .

  7. Click Finish.

  8. Specify the .CSV filename > click OK.

    This generates the .CSV file in the specified directory. Open the .CSV file in Microsoft* Excel or any other CSV-supported viewer to view the exported data.


Forming the Query and Setting the Filter Conditions

To form the query and set the filter conditions for the data export:

  1. In ConsoleOne, open the Data Export tool. See Invoking the Data Export Tool .

  2. Select Create a New Database Query.

  3. Set the following filter conditions.

    Selecting the database sites: In the Find In option, select the database sites names from the list.

    The Data Export tool will export the data from the Inventory database sites you select. This tool locates all workstations satisfying the filter conditions within the selected database sites.

    Click the Browse button to select one or more database site names from the list. In the Select Sites window, click one or more database sites. The selected site names are shown in double quotes.

    To include all database sites for data export, check the Search Entire Database check box. The data export tool will locate those workstations satisfying the filter conditions in all database sites.

    Selecting the attributes of the Inventory Components: Click the Browse Attribute button to select component attributes in the Select Attribute window. For example, to specify the version of BIOS as a component in the data export, select BIOS as the component, and select Version as the component attribute.

    Components are as follows: General, Software, Hardware, Network System.

    Operator: Relational operators show the relationship between the component and the value. Use the Matches option to specify the wildcard characters in the Value field.

    Specifying the values for the inventory attributes: Description values are the possible values of an inventory component. For example, 6.0 is a possible value for the DOS-Version attribute. Description values are not case-sensitive. Use the wildcard character % to substitute any number of characters, or the ? character to substitute one character in the Value filed.

    The list of description values displayed for an Inventory component is taken from the Inventory database corresponding to the component.

    Specifying the query connectors and controls: The connectors and controls available for building filter conditions include the following:

    AND: The expressions before and after the AND must be true.

    OR: Either the expression before the OR or the expression after the OR must be true.

    Insert Row: Lets you build the filter condition for this current row.

    Delete Row: Deletes the row.

    New Group: Lets you form a new filter condition group and specify the criteria for it. This group will be combined with the previous group by using the relational operator specified between the groups.

    End: Ends the filter condition.

  4. Click OK.


Loading Existing Configuration File

You can load an existing configuration file (.EXP). An .EXP file contains the settings such as the inventory components you selected, and also the query formed for filtering the workstation data export.

After you load the .EXP file, you can modify the settings for data export and then export the data to a .CSV file.

To load existing configuration settings for data export:

  1. Ensure that you have generated the data configuration files.

    Complete the procedure outlined in Exporting the Inventory Data to a CSV File . This procedure generates the .CSV file and the data configuration files.

  2. In ConsoleOne, open the Data Export tool. SeeInvoking the Data Export Tool .

  3. Select Open a Saved Database Query > click Next.

    The default directory for .EXP files is CONSOLEONE\version\REPORTING\EXPORT. Click Browse to open an existing .EXP file.

    If the database setting specified in the .EXP file are not valid, the data export tool uses the default setting, which includes all databases for data export.

  4. Click a saved database query from the list.

    If you want to modify the existing query, click Edit. Otherwise, to proceed with the existing query, click Next.

  5. View the data export settings. Click Next.

  6. Click Perform the Query from this Computer to run the data export processing from the workstation computer. This option will access the Inventory database on the specified database server and export the data in a .CSV file.

    To run the data export tool from a server, click Perform the Query on a Remote Server. See Running the Data Export Program From the Server .

    Click Finish.

  7. Specify the .CSV filename > click OK.

    This generates the .CSV file in the specified directory. Open the .CSV file in Microsoft Excel or any other CSV-supported viewer to view the exported data.


Running the Data Export Program From the Server

Running the Data Export program from a server is recommended if you are exporting data from a large database with more than 10,000 workstations or if you have specified complex queries with more than 20 database fields selected for exporting.

To run the data export program from the server:

  1. Ensure that you have generated the data configurations files.

    Follow the Step 1 to Step 5 outlined in Exporting the Inventory Data to a CSV File and ensure that you save the settings in the .EXP file.

    When you save an EXP file, a corresponding data configuration file is created in the same directory with the same filename as the .EXP file and with the .CFG file extension.

  2. Click Perform the Query on a Remote Server to run the data export program from any server that has Workstation Inventory components installed > click Finish.

  3. Copy the .EXP file and .CFG file to the server.

    These two files should exist in the same directory on the server.

    From the server console, run DBEXPORT.NCF on NetWare® servers or DBEXPORT.BAT on Windows* NT*/2000 servers, enter DBEXPORT "configuration_filename.EXP" "csv_filename.CSV"

    where configuration_filename.EXP is an existing file that contains the data export settings. The data exported from the database will be stored in the CSV_filename.CSV.

    In the above command, you must enter the configuration_filename.EXP and the CSV_filename.CSV filenames within double quotes.

    The corresponding .CFG file for the .EXP file should be in the same folder as the .EXP file. The .CFG file contains the list of the database attributes to be exported.

  4. Choose the Inventory sites.

    The data export displays the number of workstations that satisfy the query and filter conditions for export.

    Open the .CSV file in Microsoft Excel or any other CSV-supported viewer to view the exported data.