Select to view content in your preferred language

how use LookupDefault to write null value

292
3
12-11-2024 07:33 AM
gpgisandsky
Regular Contributor

Hi, 

I would like write null value in target db using LookupDefault cell. The target field is a LONG and the LookupSheet LookupKeys LookupValue cells has been filled.

What is the value should be entered? I tried to insert null or <null> or NULL value but the following error occour like this occour: WARNING 001156: Failed on input OID 4287, could not write value 'null' to output field f_a9f5013b1d494f26ab432a081b488558

https://pro.arcgis.com/en/pro-app/3.3/tool-reference/data-management/data-loading-workspace-concepts...

Thank you

 

0 Kudos
3 Replies
TedHoward2
Esri Contributor

Is there a default value assigned to the target field? Leaving LookupDefault cell empty is essentially setting it to null. By the way, in the lookup sheet you can map a source value to null by using an empty cell as well.

0 Kudos
gpgisandsky
Regular Contributor

Hi Ted,

The input data has the following values:

  • 0, 3, 100, 200

The target data doesn't have a default value but has the following CODED/LONG type domain assigned:

  • 100 --> aaa
  • 200 --> bbb

I would like to use LookupDefault because the values 0 and 3 must become null in my system. I know that I can map the values 0 and 3 to null in the lookup sheet by using an empty cell as well, and it works fine. However, I would like to use LookupDefault because I have many fields and I want to avoid mapping each value that falls outside my target domain.

 "Leaving LookupDefault cell empty is essentially setting it to null" I tried it, it's doesn't work. With this approch the result is that  the value 0 and 3 were  imported.

Is there a bug within the tool?

0 Kudos
TedHoward2
Esri Contributor

I can't reproduce what you're describing. Any values in the source that are not explicitly mapped in the lookupsheet should be set to whatever value is found in LookupDefault column (and leaving it empty sets it to null). You might try setting LookupDefault to a value of 999 to see if that behaves correctly.

There also might be something strange with your workbook. You can email me at thoward@esri.com if you would like me to take a closer look.

0 Kudos