upload_file = "c:\data.csv"
file_properties = {'title': friendly_name,
'tags': 'public, data, animal, welfare',
'type': 'CSV'
}
item = gis.content.add(file_properties, upload_file)
misc = item.publish()
===
I want to publish it as a Table but item.publish() results in a FeatureLayer being published.
When I do this interactively through portal, there is an option Locate Features By: coordinates or none.
I am not finding where I can in Python set this to none.
Suggestions?
Hey Greg Horne,
If you look here you can see documentation on adding a csv and then publishing it as a feature layer:
Publishing SDs, Shapefiles and CSVs | ArcGIS for Developers
If you use just this part it should just add to the portal and not publish a feature layer:
upload_file = "c:\data.csv" file_properties = {'title': friendly_name, 'tags': 'public, data, animal, welfare', 'type': 'CSV' } item = gis.content.add(file_properties, upload_file)
This line here is the part that is publishing the csv as a feature layer.
misc = item.publish()
Thanks,
Ben
If this answer was helpful please mark it as helpful. If this answer solved your question please mark it as the answer to help others who have the same question.