Skip to main content
added 1802 characters in body
Source Link

I have created a Data Interoperability Spatial ETL tool. I do have a Data Interoperability license.

I want to create a nightly batch process to run this tool.

Please helpAs suggested, I have created a python script.

import arcpy,ConfigParser

# Read Config file
Config = ConfigParser.RawConfigParser()
Config.read('Config.txt')
TOOLBOXPATH=Config.get('ETL_Spatial','ToolboxPath')


class LicenseError(Exception):
    pass

try:
    if arcpy.CheckExtension("DataInteroperability") == "Available":
        arcpy.CheckOutExtension("DataInteroperability")
        print "Checked out \"DataInteroperability\" Extension"
    else:
        raise LicenseError
except LicenseError:
    print "Data Interoperability license is unavailable"
except:
    print arcpy.GetMessages(2)

# Import custom toolbox
arcpy.ImportToolbox(TOOLBOXPATH,'DataInterop')
arcpy.SpatialETLTool()

The value of TOOLBOXPATH is C:\Data Interoperability Tools\TransmissionDataRefresh\TransmissionDataRefresh.tbx.

But again I am getting below mentioned error while executing the script:-

Checked out "DataInteroperability" Extension Traceback (most recent call last): File "C:\Data Interoperability Tools\TransmissionDataRefresh.py", line 24, in <module> arcpy.ImportToolbox(TOOLBOXPATH,'DataInterop') File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py", line 125, in ImportToolbox return import_toolbox(input_file, module_name) File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\toolbox_code.py", line 434, in import_toolbox toolbox = gp.createObject("Toolbox", tbxfile) File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\_base.py", line 381, in createObject self._gp.CreateObject(*gp_fixargs(args, True))) IOError: The toolbox file C:\Data Interoperability Tools\TransmissionDataRefresh\TransmissionDataRefresh.tbx was not found.

Please help

I have created a Data Interoperability Spatial ETL tool. I do have a Data Interoperability license.

I want to create a nightly batch process to run this tool.

Please help

I have created a Data Interoperability Spatial ETL tool. I do have a Data Interoperability license.

I want to create a nightly batch process to run this tool.

As suggested, I have created a python script.

import arcpy,ConfigParser

# Read Config file
Config = ConfigParser.RawConfigParser()
Config.read('Config.txt')
TOOLBOXPATH=Config.get('ETL_Spatial','ToolboxPath')


class LicenseError(Exception):
    pass

try:
    if arcpy.CheckExtension("DataInteroperability") == "Available":
        arcpy.CheckOutExtension("DataInteroperability")
        print "Checked out \"DataInteroperability\" Extension"
    else:
        raise LicenseError
except LicenseError:
    print "Data Interoperability license is unavailable"
except:
    print arcpy.GetMessages(2)

# Import custom toolbox
arcpy.ImportToolbox(TOOLBOXPATH,'DataInterop')
arcpy.SpatialETLTool()

The value of TOOLBOXPATH is C:\Data Interoperability Tools\TransmissionDataRefresh\TransmissionDataRefresh.tbx.

But again I am getting below mentioned error while executing the script:-

Checked out "DataInteroperability" Extension Traceback (most recent call last): File "C:\Data Interoperability Tools\TransmissionDataRefresh.py", line 24, in <module> arcpy.ImportToolbox(TOOLBOXPATH,'DataInterop') File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py", line 125, in ImportToolbox return import_toolbox(input_file, module_name) File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\toolbox_code.py", line 434, in import_toolbox toolbox = gp.createObject("Toolbox", tbxfile) File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\_base.py", line 381, in createObject self._gp.CreateObject(*gp_fixargs(args, True))) IOError: The toolbox file C:\Data Interoperability Tools\TransmissionDataRefresh\TransmissionDataRefresh.tbx was not found.

Please help

Source Link

Execute a batch process of a spatial tool within an ArcGIS Toolbox

I have created a Data Interoperability Spatial ETL tool. I do have a Data Interoperability license.

I want to create a nightly batch process to run this tool.

Please help