3 Replies Latest reply on Jan 30, 2018 9:52 AM by Julian Wigman

    Simple Imports questions

    Mark6785 Apprentice

      Summary - I have a ;list of 8000 computer's asset tags and their corresponding "main user"  in an SQL database belonging to our "snow inventory system"

       

      I want to import them into Landesk and map them to Configuration management\configuration Item\Snow Freq User  (a str attrib i created)

       

      but when I do I get 8000 errors along the lines of:

      29/01/2018 15:13:32 : There was an Object Type Missmatch.  Config._Laptop != Config.ConfigItem (076969)

       

      I think this is because we have "sub-objects"  like Configuration item\baseunit ( or laptop etc) with  collection(?)  linking and sharing some of the attribs

      I dont see why I shouldnt be able to match on CI number and put a string into the "frequent user" attrib as both of these are at the top level (configuration item) and leave the ones that are not matched blank.

       

      I have a feeling we tried this a couple of years ago and then decided we needed to put 2 separate imports against laptop and baseunit - but this resulted in thousands of extra records being created when the target laptop was a baseunit , or vice versa.

       

      ==================================

      Which brings me onto question 2

      Sometimes we like an import to create a new record in Landesk if there is no match - for instance if a newuser has been created in AD.

      And sometimes We'd like it to forget it if theres no match and move on - like in the above laptop/baseunit example.

       

      How do you tell an import which of those to do?

       

      Thanks,

      -mark

        • 1. Re: Simple Imports questions
          Julian Wigman ITSMMVPGroup

          You would need to create 2 imports, into their respective target CI types BUT on each import you add a filter query (bottom left of Import setup window) so that it only imports the items of the correct type from the spreadsheet.

           

          Julian

          MarXtar Ltd

          • 2. Re: Simple Imports questions
            Mark6785 Apprentice

            Thanks Julian,  I found the filter query and had a play with it . Shame it only lets you filter on the input side of the import. I have to rely on the snow system knowing wether a machine "is_portable" or not (a binary field Landesk dosent want to read)  , and even that isnt a defining sign its a laptop as we have a handful of other portable stuff, so ended up creating duplicate records ... in test so no prob.

            I think now i've learned about that filter it may be handy for making some user imports run smoother .

             

            I'm tempted to just run a scheduled SQL job to pull the "frequent user" from the  snow server  DB into the Servicedesk DB Config_item record , like this:

            USE LDservicedeskUAT

            UPDATE   cf_config_item

            SET cf_config_item.usr_SnowFreqUser = sno.[Most Frequent User]

            FROM cf_config_item JOIN  [SnowSRV01].[SnowLicenseManager].[dbo].[vw_SNOW_devices] AS sno

               ON cf_config_item.cf_title =  sno.LDname COLLATE SQL_Latin1_General_CP1_CI_AS

             

            Its taken me  all afternoon to get that working , but looks good in test , and no risk of duplictes.

            • 3. Re: Simple Imports questions
              Julian Wigman ITSMMVPGroup

              People do import data via the SQL backend for sure.

               

              Bear in mind though it wouldn't increment automatic versions though if you happen to have versioning enabled.

               

              Julian

              MarXtar Ltd