Select to view content in your preferred language

Create hosted table in AGOL using Python

552
1
02-02-2022 11:28 PM
GonzalezMorales
Emerging Contributor

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"},
                           data=csv_file)          

csv_lyr= csv_item.publish()

 

 

 

How do I create a Hosted Table service instead?

 

Tags (3)
0 Kudos
1 Reply
GonzalezMorales
Emerging Contributor

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