Learn how to import data to create a table in a feature service.
Importing data is the process of using data management tools
In this tutorial, you use data management tools
Prerequisites
You need an account
Steps
Download the data
- Download the Santa Monica parcels table CSV file from ArcGIS portal.
Import the parcel information CSV file
The CSV file contains data with attributes
Follow the steps below to use Data management tools or Scripting APIs:
In your web browser, go to https://location.arcgis.com, and sign in with your ArcGIS Location Platform account
-
In the top navigation bar, click Content.
-
Click New item. To upload the Santa Monica Parcels Shapefile, you can either:
- Drag and drop the file.
- Or, click Your device and navigate to the file path.
-
Select Add santa-monica-parcels.csv to publish the file as a hosted feature table
A table is a non-spatial dataset in a feature service. All records in a table share the same set of fields. . -
In Fields, leave all fields at their default settings and click Next.
-
In Location settings, Select None under Specify the type of location information the file contains and click Next.
-
Set the following information in the item details pane:
- Title:
Santa Monica parcel table - Tags:
Santa Monicaparcel,table,tutorial. - Summary:
Parcel data for the City of Santa Monica
- Title:
-
Click Save to create the new table
A table is a non-spatial dataset in a feature service. All records in a table share the same set of fields. and feature serviceA feature service is a data service that provides access to spatial and non-spatial data in feature layers, feature layer views, and tables. .
To access a hosted feature table from an application, you need to be able to identify its ID
- In the item page
An item page is a web page in ArcGIS Online or the developer dashboard used to access and manage the properties for an item and the content it references such as a web map, hosted layer, or file. of the layer, find the Item IDAn item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. and Point Layer URL. They should look something like this:- Layer ID: 84c6c48c754e4e26a886c54dbc1372d4
- Point Layer URL:
https://services3.arcgis.com/ G Vgb Jbqm8h XASV Yi/arcgis/rest/services/ Santa _Monica _parcels _table/ Feature Server/
- Import the required libraries.
- Implement authentication.
- Create and publish a portal item.
- Handle the results.
# local path to csv file
input_file_path = str(Path(__file__).parent / "data/santa-monica-parcels.csv")
# add the csv file as an item to portal
csv_item = portal.content.add(
{
"title": "Santa Monica parcels table",
"description": "Table imported from CSV file in Santa Monica",
"tags": "Santa Monica, parcels, table, tutorial",
},
input_file_path,
)
# publish the item to create a hosted featurelayer
csv_service = csv_item.publish(None)
print(f"New item id : {csv_service.id}, url: {csv_service.url}")You now have a table
What's next?
Learn how to use additional tools, APIs, and location services in these tutorials:

Define a new feature layer
Use data management tools to define and create a new empty feature layer in a feature service.

Manage a feature layer
Use a hosted feature layer item to set the properties and settings of a feature layer in a feature service.

Create a vector tile service
Use data management tools to create a new vector tile service from a feature service.






