I have a ETL tool that transform our data into a different data model, I would like to run automatically on a weekly basis. Can I convert it to python script? Thanks in advance!
I've never tried myself, but wouldn't it be easier to just write something quick in Python that runs your existing tool, instead of trying to convert everything to Python?
Absolutely and that is what I am trying to figure out. Thanks!
Does this help? Not sure what flavour of Spatial ETL tools you're running.
Run an FME Workspace from Python using FMEWorkspaceRunner | FME Samples and Demos
Once the Python is written, just have your Windows Task Scheduler call the Python file at whatever interval/time frame you choose.
Thanks. I found this and I am trying to have a similar simple python script.
Run your ETL tool and from the results window right click the result and copy it as a Python snippet.
Then create a standalone Python script that imports arcpy and imports the toolbox, before executing the snippet, like:
import arcpy
arcpy.ImportToolBox(r'C:\Temp\NEARBug.gdb\NEARBug')
arcpy.SpatialETLTool("'C:/Work/Product Management/Loqate/Loqate.gdb'","geodatabase")
I will let you know if this works for me.
Be sure that you're running the 32 bit Python executable. I have a batch file that calls this version, then my script like below:
C:/Python27/ArcGIS10.4/python.exe myscript.py
Otherwise, I'd receive a "AttributeError: 'module' has no attribute when calling Spatial ETL tool" error.