i need to geocode addresses from an Oracle View. This has to be implemented with Arcpy.
first i try this in ArcMap (10.6.1) by adding my view as query layer and geocoding the addresses with a local locator .all this with the user interface.
this went fine and really quick.
then i have tried to implement these steps with Arcpy like this:
myoracledb_sde = "Connexions aux bases de données\\myoracledb.sde"
ADDRESS_DATA = "ADDRESSES_FROM_MY_VIEW"
BDTOPO_Advanced = "C:\\DATA\\Advanced\\L93\\Data\\locators\\Advanced\\BDTOPO_Advanced"
GeocodeAddresses = "C:\\Users\\xxxx\\Documents\\ArcGIS\\Default.gdb\\GeocodeAddresses"
LOCATOR_FIELDS_CONFIG = "Address NO_NOM_VOIE VISIBLE NONE;Postal ADR_CODE_POSTAL VISIBLE NONE;Neighborhood <Aucun> VISIBLE NONE;City ADR_COMMUNE VISIBLE NONE;Subregion '' VISIBLE NONE;State <Aucun> VISIBLE NONE;Country <Aucun> VISIBLE NONE"
# add query layer
arcpy.MakeQueryLayer_management(myoracledb_sde, ADDRESS_DATA, "select * from xyz.V_ADDRESS_DATA", "ID", "", "", "")
# geocode addresses
arcpy.GeocodeAddresses_geocoding(ADDRESS_DATA, BDTOPO_Advanced, LOCATOR_FIELDS_CONFIG, GeocodeAddresses, "STATIC", "", "")
the "add query layer" step works fine (the connection to db is ok) but the second step failed with:
ERROR 000732: Table en entrée : le jeu de données ADDRESSES_FROM_MY_VIEW n’existe pas ou n’est pas pris en charge
i am not sure about the first parameter of arcpy.GeocodeAddresses_geocoding and how to set it in my case?
how i did it seems to be incorrect.
the way i choose with "add query layer and GeocodeAddresses_geocoding" is perhaps not the suitable one.
but it works fine in ArcMap with the user interface ! so i was supposing i can implement this in Arcpy.
what am i doing wrong?
thanks for your help.