I am attempting to automate a workflow in python. If I execute the "split by attributes" tool in AGRGIS, the output is shapefiles (which is what I want). However, if I "copy as python snippet" from the results window and paste it into a python script...the output is dbf files. The output is being saved to a gdb. The output is only a table whether it is saved to a folder or gdb.
The python snippet:
arcpy.SplitByAttributes_analysis(Input_Table="contours", Target_Workspace="C:/temp/data.gdb", Split_Fields="CONTOUR")
Why doesn't arcpy generate shapefiles?
Solved! Go to Solution.
ITS a BUG!!!
https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwMzk1NA==
The Split By Attribute script tool only generates table outputs when running in ArcCatalog and a standalone Python script.
Status not in current production plan
Run the tool in ArcMap.
If the input is a featureclass and not a table and the target location is a folder not a geodatabase, do you get dbf's or shapefiles?
The input is always a shapefile...the output is always a dbf regardless of where it is stored.
Split Layer by Attributes the original... check the code that I used if you are in a pinch.
As for the ArcMap version, ... could be a bug since I don't see anything in the link or the code description that would suggest otherwise.
ITS a BUG!!!
https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwMzk1NA==
The Split By Attribute script tool only generates table outputs when running in ArcCatalog and a standalone Python script.
Status not in current production plan
Run the tool in ArcMap.
Thanks Dan! The documentation needs to change to reflect that the output will always and forever be a table.