Jump to content

Asset Import Tool - CSV


Recommended Posts

I had started testing importing from a csv file last November and had it working but I then got diverted onto other things and have only just come back to it

I made a bit of a change with the csv file and the import tool has updated to a new version since then

I changed the field mappings to match the new column headings but it seems to be failing on the AssetTypes section which shouldn't have changed except for the column header I'm using

    "AssetTypes": [{
        "AssetType": "Laptop",
        "OperationType": "Both",
        "CSVFile": "Asset Export Hornbill test.csv",
        "CSVFilters": [
            {
                "Column": "computer_type",
                "Operator": "IN",
                "Value": "LAPTOP, NOTEBOOK, CONVERTIBLE, TABLET"
            }
        ],
        "PreserveShared": false,
        "PreserveState": false,
        "PreserveSubState": false,
        "PreserveOperationalState": false,
        "AssetIdentifier": {
            "SourceColumn": "servicetag",
            "Entity": "AssetsComputer",
            "EntityColumn": "h_serial_number",
            "SourceContractColumn": "",
            "SourceSupplierColumn": ""

In the log file I am seeing the following error

2024/03/28 14:59:11 [DEBUG] Asset Type and Class: Laptop 6 computer
2024/03/28 14:59:11  
2024/03/28 14:59:11 Running CSV query for Laptop assets. Please wait...
2024/03/28 14:59:12 [DEBUG] Validating computer_type value: NOTEBOOK
2024/03/28 14:59:12 [DEBUG] Column validation [computer_type] [NOTEBOOK] IN [LAPTOP,NOTEBOOK,CONVERTIBLE,TABLET]
2024/03/28 14:59:12 [DEBUG] Column failed validation
2024/03/28 14:59:12 [DEBUG] Validating computer_type value: NOTEBOOK
2024/03/28 14:59:12 [DEBUG] Column validation [computer_type] [NOTEBOOK] IN [LAPTOP,NOTEBOOK,CONVERTIBLE,TABLET]
2024/03/28 14:59:12 [DEBUG] Column failed validation
2024/03/28 14:59:12 0 of 2 returned assets successfully retrieved ready for processing.

The system I'm importing from has multiple values for the computer type that I want to group into either laptops or desktops

Laptops: NOTEBOOK, LAPTOP, CONVERTIBLE, TABLET

Desktops: MINI_PC, DESKTOP, LOW_PROFILE_DESKTOP, MINI_TOWER, SPACE_SAVING, TOWER

What am I missing?

 

import file.csv

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...