Create hosted table in AGOL using Python

02-02-2022 11:28 PM
New Contributor II

Could anyone share a how to publish a hosted table? 

This is a very basic question from a beginner, but I have not been able to figure this out from the documentation.

I use this to create a feature service:



csv_file = 'mydir/mytable.csv'
csv_item = gis.content.add(item_properties = {"type": "CSV",
                                   "title" : "My title",
                                   "tags": "tag1, tag2", 
                                   "description" : "My description"},

csv_lyr= csv_item.publish()




How do I create a Hosted Table service instead?


Tags (3)
0 Kudos
1 Reply
New Contributor II

Well, I think I got it...  It seems that I need to set 'locationType' to 'none'.  


csv_lyr= csv_item.publish(publish_parameters = {'locationType': 'none', 'name':'my_name'})



0 Kudos