Difference between revisions of "Asset Data Import Tool"
Jump to navigation
Jump to search
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | This document can now be found at its new location in the [https://docs.hornbill.com/data-imports-guide/assets/overview Hornbill Document Library]. | ||
+ | |||
+ | [[file:hornbill-document-library.png|Data Imports Guide|link=https://docs.hornbill.com/data-imports-guide/assets/overview]] | ||
+ | |||
+ | <!-- | ||
+ | |||
+ | |||
=About the Hornbill Asset Import Utility= | =About the Hornbill Asset Import Utility= | ||
Line 5: | Line 12: | ||
==Open Source== | ==Open Source== | ||
− | The | + | The Azure User Import Utility is no longer provided open-source, and is maintained solely by Hornbill as a closed-source, but free-to-use, tool. |
− | |||
− | |||
− | |||
==Installation Overview== | ==Installation Overview== | ||
Line 22: | Line 26: | ||
For Windows Systems: | For Windows Systems: | ||
<code> | <code> | ||
− | + | asset_import.exe -dryrun=true -file=conf_example_db_sccm.json | |
− | |||
− | |||
− | |||
− | |||
− | |||
</code> | </code> | ||
Line 36: | Line 35: | ||
<pre> | <pre> | ||
{ | { | ||
− | |||
− | |||
"KeysafeKeyID": 0, | "KeysafeKeyID": 0, | ||
"LogSizeBytes": 1000000, | "LogSizeBytes": 1000000, | ||
Line 191: | Line 188: | ||
==InstanceConfig== | ==InstanceConfig== | ||
− | |||
− | |||
* <code>KeysafeKeyID</code> - The ID of the Keysafe Key that holds your data source credentials. Set to 0 for importing directly from CSV files. Supported Keysafe key types are: | * <code>KeysafeKeyID</code> - The ID of the Keysafe Key that holds your data source credentials. Set to 0 for importing directly from CSV files. Supported Keysafe key types are: | ||
** <code>Database Authentication</code> | ** <code>Database Authentication</code> | ||
Line 336: | Line 331: | ||
* <code><nowiki>{{.columnName | epoch}}</nowiki></code> will convert an epoch value to the YYYY-MM-DD HH:II:SS format required for a Hornbill DateTime field | * <code><nowiki>{{.columnName | epoch}}</nowiki></code> will convert an epoch value to the YYYY-MM-DD HH:II:SS format required for a Hornbill DateTime field | ||
* <code><nowiki>{{.columnName | epoch_clear}}</nowiki></code> will convert an epoch value to the YYYY-MM-DD HH:II:SS format required for a Hornbill DateTime field. Defaulting to CLEAR the column if unable to convert. | * <code><nowiki>{{.columnName | epoch_clear}}</nowiki></code> will convert an epoch value to the YYYY-MM-DD HH:II:SS format required for a Hornbill DateTime field. Defaulting to CLEAR the column if unable to convert. | ||
− | * <code><nowiki>{{.columnName | date_conversion "date time format of the content in .columnName"}}</nowiki></code> Provide the input format based on the following reference time of Jan | + | * <code><nowiki>{{.columnName | date_conversion "date time format of the content in .columnName"}}</nowiki></code> Provide the input format based on the following reference time of Jan 2nd 2006 4 minutes and 5 seconds past 3pm - eg "02/01/2006 15:04:05" will convert the regular UK/European date time format to the format useable in the Hornbill datetime field, whereas "01/02/2006 15:04" will process default US date time. '''Please note''' that IF your formatting is already in the Hornbill date time format (2006-01-02 15:04:05), you don't need to convert anything. |
− | * <code><nowiki>{{.columnName | date_conversion_clear "date time format of the content in .columnName"}}</nowiki></code> Provide the input format based on the following reference time of Jan | + | * <code><nowiki>{{.columnName | date_conversion_clear "date time format of the content in .columnName"}}</nowiki></code> Provide the input format based on the following reference time of Jan 2nd 2006 4 minutes and 5 seconds past 3pm - eg "02/01/2006 15:04:05" will convert the regular UK/European date time format to the format useable in the Hornbill datetime field, whereas "01/02/2006 15:04" will process default US date time. Defaulting to CLEAR the column if unable to convert. |
==AssetTypeFieldMapping== | ==AssetTypeFieldMapping== | ||
Line 356: | Line 351: | ||
<pre> | <pre> | ||
{ | { | ||
− | |||
− | |||
"KeysafeKeyID": 0, | "KeysafeKeyID": 0, | ||
"LogSizeBytes": 1000000, | "LogSizeBytes": 1000000, | ||
Line 525: | Line 518: | ||
<pre> | <pre> | ||
{ | { | ||
− | |||
− | |||
"KeysafeKeyID": 0, | "KeysafeKeyID": 0, | ||
"LogSizeBytes": 1000000, | "LogSizeBytes": 1000000, | ||
Line 610: | Line 601: | ||
<pre> | <pre> | ||
{ | { | ||
− | |||
− | |||
"KeysafeKeyID": 0, | "KeysafeKeyID": 0, | ||
"LogSizeBytes": 1000000, | "LogSizeBytes": 1000000, | ||
Line 681: | Line 670: | ||
<pre> | <pre> | ||
{ | { | ||
− | |||
− | |||
"KeysafeKeyID": 0, | "KeysafeKeyID": 0, | ||
"LogSizeBytes": 1000000, | "LogSizeBytes": 1000000, | ||
Line 774: | Line 761: | ||
* data:entityUpdateRecord | * data:entityUpdateRecord | ||
* data:queryExec | * data:queryExec | ||
+ | * session:getApplicationList | ||
* system:logMessage | * system:logMessage | ||
* apps/com.hornbill.core:getSitesList | * apps/com.hornbill.core:getSitesList | ||
Line 786: | Line 774: | ||
* debug - defaults to `false` = Set to true to enable debug mode, which will output debugging information to the log | * debug - defaults to `false` = Set to true to enable debug mode, which will output debugging information to the log | ||
* forceupdates - one of the optimisations, previously included, is the comparison between new data and old data in order to decided whether the record needs an update or not. The decision is, in essence, a detection of changes in SOURCE data, not any data that might have been manipulated by using the template. This paramater caters for this - i.e. an update will always be attempted - whether or not there are going to be any changes. | * forceupdates - one of the optimisations, previously included, is the comparison between new data and old data in order to decided whether the record needs an update or not. The decision is, in essence, a detection of changes in SOURCE data, not any data that might have been manipulated by using the template. This paramater caters for this - i.e. an update will always be attempted - whether or not there are going to be any changes. | ||
+ | * creds - Defaults to `false` - Set to `true` to decrypt and output the API key that is stored locally. NOTE - the tool will prompt you for your instance ID, and this can only be decrypted by the user who originally performed the encryption, and only on the same machine that it was encrypted on. | ||
+ | |||
+ | === First Run === | ||
+ | |||
+ | From version '''4.0.0''' of the Asset Import Utility, when you first run the utility it will prompt you for the ID of your Hornbill instance (case-sensitive), and the API key (also case-sensitive)that will be used to authenticate the API calls back into Hornbill. This information will be encrypted, and stored locally on the client PC that will be running the tool. For each subsequent import run, the utility will decrypt your instance ID and API key, and will use those to make the API calls back into Hornbill. | ||
+ | |||
+ | NOTE - the encrypted instance ID and API key can only be decrypted on the computer, and by the user, that performed the encryption, so please keep this in mind when scheduling your imports. | ||
+ | |||
+ | Should you wish to use a different API key to what has been previously encrypted, just delete the '''import.cfg''' file from the folder where the import binary resides, and re-run your import from the command line inputting the Instance ID and new API Key as you would have on its first run. | ||
=Testing Overview= | =Testing Overview= | ||
Line 860: | Line 857: | ||
[[Category:Integration]] | [[Category:Integration]] | ||
+ | --> | ||
+ | [[Category:HDOC]] |
Latest revision as of 18:06, 10 April 2024
This document can now be found at its new location in the Hornbill Document Library.