how to use external data sources like SQL table or REST end point

2205
4
Jump to solution
01-27-2021 05:05 AM
JayAppusamy
New Contributor

I'm new to dashboard, Can I access data from external data sources? for example

  1. Database Table / View which is not registered with Geodatabase (Example: Employee or User table)
  2. Rest Endpoint (Example: OpenWeatherMap API)
0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

@JayAppusamy,

1.  ArcGIS Dashboard won't be able to access data from a database table unless it's published as a service. ArcGIS Insights does have the ability to connect directly to a Database.  That may be an option you can explorer.

https://doc.arcgis.com/en/insights/latest/get-started/create-a-database-connection.htm

2.  If the REST Endpoint is added as an item to your Organization (i.e AGOL, ArcGIS Enteprise), or added to a web map, then it will be accessible in the Dashboard.

View solution in original post

4 Replies
JakeSkinner
Esri Esteemed Contributor

@JayAppusamy,

1.  ArcGIS Dashboard won't be able to access data from a database table unless it's published as a service. ArcGIS Insights does have the ability to connect directly to a Database.  That may be an option you can explorer.

https://doc.arcgis.com/en/insights/latest/get-started/create-a-database-connection.htm

2.  If the REST Endpoint is added as an item to your Organization (i.e AGOL, ArcGIS Enteprise), or added to a web map, then it will be accessible in the Dashboard.

mikAMD
by
Occasional Contributor II

As an example, as @JakeSkinner pointed out, I added my API (json) to AGOL:

New item > URL > Type: GeoJSON > Add data and create a hosted feature layer

Then I was able to access this hosted table directly from Dashboard.

 

EDIT:

24h later, I realized that the item in AGOL does not refresh based on the source. So for example when I added the item to AGOL yesterday november 1st, the last available date from source was october 31st. Today, november 2nd, the last available date in the source is november 1st. However the last date in the item on AGOL is still october 31st. So I will have to create a workaround 😞

0 Kudos
JakeSkinner
Esri Esteemed Contributor

@mikAMD,

You could create a model in ArcGIS Pro that performs the following:

1.  Converts the JSON URL to a feature class using Pro's JSON to Features tool

2.  Truncate the AGOL feature service using Truncate Table.  I can't recall if this works on AGOL feature services, so you may have to use Delete Features instead

3.  Append the feature class created from step 1 to the AGOL feature service.

0 Kudos
mikAMD
by
Occasional Contributor II

Hi @JakeSkinner,

I ended up creating a python script that runs every day, gets the data from the wanted API, processes it and sends it to AGOL with the append function and upsert parameter in the API.

Thanks for your suggestion!

0 Kudos