0

enter image description here

I am getting this error shown in the picture when I try to export a database view into a GDB table in ArcMap 10.4. I know what is causing the error, its the double quotes I use to create alias names for the columns that I am trying to export in the view. The reason I am doing this is because the company policy states that columns in datasets that we upload to ArcGIS Online must be plain text with no underscores, or other characters. So what im wondering is whether there is a way to create the aliases in Oracle 11g, PL-SQL Developer, that will work in ArcMap. Single quotes don't work they are an invalid identifier in Oracle 11g.

Here is an example of what is not working in ArcMap:

t.AS_BUILT_AGGREGATE_SIZE as "AS BUILT AGGREGATE SIZE",
t.as_built_hamburg_voids as "AS BUILT HAMBURG VOIDS",
t.as_built_vma as "AS BUILT VMA",
t.as_built_vfa as "AS BUILT VFA",

When I remove the alias, it exports fine. There are many columns and I would rather not do this by hand in ArcMap.

  • I am not entirely certain this workflow will give you what you want. Perhaps your question should be more targeted. In response to the subquestion of how to add or change ArcGIS enterprise registered field aliases, the supported method is to use an arcpy script to roll through the fields and call arcpy.AlterField_management on each one you wish to alter. This could be as simple as taking the fieldname, swapping spaces in for underscores and using the results to create the alias. – pauldzy Mar 23 '18 at 21:40
  • But you seem to say you must accomplish this outside the Esri ecosystem via direct SQL. Are you sure that is a requirement? If this is indeed the case its possible by updating the XML definition field in the sde.gdb_items table. But this is unsupported and a lot of work compared to an arcpy script. – pauldzy Mar 23 '18 at 21:40
  • 2
    ArcGIS requires legal SQL identifiers, even if the database permits illegal identifiers through the use of double quotes. Spaces are not permitted in standard SQL field identifiers. Lose the double-quotes and change the spaces to underscores. Make sure you don't exceed 30 characters. – Vince Mar 23 '18 at 22:30
  • 1
    Hi Thomas, I think I completely missed you question and as usual Vince is on the mark. So when you say "alias" you do not mean the Esri managed enterprise geodatabase alias but rather you mean a SQL alias. Sorry I missed that. So just as Vince says you cannot have spaces in the physical underlying fieldnames. But you could leave the underscores as they are in the underlying fieldname but then place an Esri-managed alias over the top. Would this satisfy your organization's needs to remove underscores? Looking at this again, I think your Excel workflow is doing just that. – pauldzy Mar 25 '18 at 22:24
  • 1
    Look more closely at your resulting items in ArcGIS Online and I bet you will see the underlying name of the fields have underscores and follow the rules Vince mentioned but the Excel fieldnames have been loaded as Esri-managed aliases for the field. It's a bit confusing but you probably need to learn how it all works. My suggestion would be keep the original fieldnames as they are in Oracle and then via arcpy (or manually via ArcCatalog) place your organization friendly name over the top. When you load this into ArcGIS Online it should all be respected. – pauldzy Mar 25 '18 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.