Learn how to import data to create a table in a feature service.

Importing data is the process of using data management tools in your portal to upload a file to create a table in a feature service. Each file you import becomes a table in the service. A table is used to store only attributes; no geometry or locations fields are needed. After a table is created, applications can access it by using its ID or URL. You can also query, edit, and join the table to other features.
In this tutorial, you use data management tools and scripting APIs to import a CSV file of parcel attributes to create a table in a feature service.
Prerequisites
You need an account for ArcGIS Platform, ArcGIS Online, or ArcGIS Enterprise to create hosted data services. If you need an account, go to Get started.
Steps
Download the data
- Download the Santa Monica parcels table CSV file from ArcGIS.com.
Import the parcel information CSV file
The CSV file contains data with attributes containing parcel information, but no location (geometry or address) fields. Importing the file will create a new table in a feature service.
Follow the steps below to use Data management tools or Scripting APIs:
In your web browser, go to ArcGIS.com and sign in with your ArcGIS Developer 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.
-
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 Monica
parcel
,table
,tutorial
. - Summary:
Parcel data for the City of Santa Monica
- Title:
-
Click Save to create the new table and feature service.
To access a hosted feature table from an application, you need to be able to identify its ID and URL. If a hosted feature table is public, you use the URL to access it directly with your web browser or any application. If the layer is private, you need to provide an access token.
- In the item page of the layer, find the Item ID and Point Layer URL. They should look something like this:
- Layer ID: 84c6c48c754e4e26a886c54dbc1372d4
- Point Layer URL:
https:
//services3.arcgis.com/GVgb Jbqm8h XASVYi/arcgis/rest/services/Santa_ Monica_ parcels_ table/Feature Server/
In your web browser, go to ArcGIS.com and sign in with your ArcGIS Online 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.
-
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 Monica
parcel
,table
,tutorial
. - Summary:
Parcel data for the City of Santa Monica
- Title:
-
Click Save to create the new table and feature service.
To access a hosted feature table from an application, you need to be able to identify its ID and URL. If a hosted feature table is public, you use the URL to access it directly with your web browser or any application. If the layer is private, you need to provide an access token.
- In the item page of the layer, find the Item ID and Point Layer URL. They should look something like this:
- Layer ID: 84c6c48c754e4e26a886c54dbc1372d4
- Point Layer URL:
https:
//services3.arcgis.com/GVgb Jbqm8h XASVYi/arcgis/rest/services/Santa_ Monica_ parcels_ table/Feature Server/
In your web browser, go to your ArcGIS Enterprise portal website and sign in with your ArcGIS Enterprise 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.
-
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 Monica
parcel
,table
,tutorial
. - Summary:
Parcel data for the City of Santa Monica
- Title:
-
Click Save to create the new table and feature service.
To access a hosted feature table from an application, you need to be able to identify its ID and URL. If a hosted feature table is public, you use the URL to access it directly with your web browser or any application. If the layer is private, you need to provide an access token.
Public: https://{host}/{webadaptor}/rest/services/Trailheads/FeatureServer/0
Private: https://{host}/{webadaptor}/rest/services/Trailheads/FeatureServer/0?token=ACCESS_TOKEN
- In the item page of the layer, find the Item ID and Point Layer URL. They should look something like this:
- Layer ID: 883cedb8c9fe4524b64d47666ed234a7
- Point Layer URL:
https:
//\{host\}/\{webadaptor\}/rest/services/Santa_ Monica_ parcels_ table/Feature Server/
You can use ArcGIS Pro to import CSV data.
- Launch ArcGIS Pro.
- Create a new map project.
- A map with
World Topographic Map
andWorld Hillshade
basemap layers will be created.
- In the Map ribbon, click on Add Data > Data.
- Select the Santa_Monica_parcels_0.csv file.
The Santa_Monica_parcels_0.csv file will be added to the Contents pane as a new standalone table.
Share as table
You can now share the Santa_Monica_parcels_0.csv table as a hosted table.
- Right-click on the table and click Sharing > Share as Table.
- The Share As Table geoprocessing tool will be displayed.
- Set the following required information in the General tab:
- Name:
Santa_
Monica_ Parcels - Provide text for Summary
- Provide text for Tags
- Set a location in your organization in Location
- Name:
- Click Analyze
- Any errors or warning during the analyze process will be displayed the Messages tab.
- Click Publish
- Import the required libraries.
- Provide an access token.
- 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}")
// create item
const csvItem = await createItem({
authentication: auth,
item: {
title: 'Santa Monica parcels table',
description: 'Parcel data imported from CSV file in Santa Monica',
tags: 'Santa, Monica, parcel, table, tutorial',
type: 'CSV',
},
file: f,
});
// execute publish operation
const publishedService = await request(publishURL, {
authentication: auth,
params: {
itemid: csvItem.id,
filetype: 'csv',
publishParameters: publishParams,
},
});
// handle results
console.log('New service created: ');
publishedService.services.forEach((s) => {
console.log(`\n\tid: ${s.serviceItemId} \n\turl:${s.serviceurl}`);
});
You now have a table hosted in ArcGIS. You can access it with its service URL or layer item ID in your applications. To manage your hosted layer (item) properties and capabilities, visit the Manage a feature layer tutorial.
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.

Add a feature layer
Access and display point, line, and polygon features from a feature service.

Add a vector tile layer
Access and display a vector tile layer in a map.

Add a map tile layer
Access and display a map tile layer in a map.

Style a feature layer
Use symbols and renderers to style feature layers.

Query a feature layer (spatial)
Execute a spatial query to get features from a feature layer.

Query a feature layer (SQL)
Execute a SQL query to access polygon features from a feature layer.

Edit feature data
Add, update, and delete features in a feature service.

Display a popup
Format a popup to show attributes in a feature layer.