Is it possible to connect a custom SQL Query to ArcGIS Pro?

1924
5
Jump to solution
04-23-2021 04:05 PM
MikeBinder
New Contributor II

This might be a newb question, since I'm not really a GIS person, but am trying to learn.

Using Pro 2.6.0 and am able to connect to my server and database. Goal is to use a custom SQL query (and avoid bringing in a boat load of data to bog it down). Is it possible to use a custom SQL query? How would I do that if possible? I've searched the community, google, and youtube and am not finding a solution. BI tools like Power BI, Tableau, etc. this functionality is pretty easy, but I'm struggling to figure out how to do with ArcGIS Pro. 

Thank you in advance! 

Signed, 

BI Analyst who's dipping his toe into GIS  

0 Kudos
2 Solutions

Accepted Solutions
Luke_Pinner
MVP Regular Contributor
jcarlson
MVP Esteemed Contributor

I don't know if it's different from the GP tool outputs, but you can also add a query layer from the Add Data dialog.

We've used them extensively to create custom layers, even a few that spatially intersect and aggregate 3+ separate tables. You can make the query as complex as you want, as long as the DB can successfully evaluate it.

- Josh Carlson
Kendall County GIS

View solution in original post

5 Replies
DanPatterson
MVP Esteemed Contributor

SQL reference for query expressions used in ArcGIS—ArcGIS Pro | Documentation

An overview of the Business Analyst toolbox—ArcGIS Pro | Documentation

Not familiar with the field, but SQL is pretty standard and then there is the Business Analyst Extension


... sort of retired...
0 Kudos
Luke_Pinner
MVP Regular Contributor

The following might be what you're looking for

Make Query Table (Data Management)

Make Query Layer (Data Management)

 

jcarlson
MVP Esteemed Contributor

I don't know if it's different from the GP tool outputs, but you can also add a query layer from the Add Data dialog.

We've used them extensively to create custom layers, even a few that spatially intersect and aggregate 3+ separate tables. You can make the query as complex as you want, as long as the DB can successfully evaluate it.

- Josh Carlson
Kendall County GIS
MikeBinder
New Contributor II

Thanks for your response. Yes, this is what I was looking for!  I'm able to create a standalone table with just the columns and tables I need.

If I can ask a follow up question. My data contain points with Lat/Longs where I tell the standalone table to display XY Data and it creates a  feature layer and maps the points. However, if I update or refresh the SQL query, just the standalone table gets updated and not the feature layer. Is there a better way to configure the data so that the SQL instantly updates on the map? 

0 Kudos
MikeBinder
New Contributor II

Thank you, yes the query layer was what I was looking for. 

0 Kudos