How to use ArcGIS Pro with SQLite

10329
20
01-30-2015 02:44 AM
LarsLarsen
New Contributor II

As far as I can see there is no direct support for SQLLite in Pro. Is that a planned feature ? Can I access SQLite through phyton and import data as layers that way?

20 Replies
JoshuaBixby
MVP Esteemed Contributor

I think Esri would agree, i.e., SQLite isn't currently fully supported in ArcGIS Pro.

Although "seeing" SQLite databases isn't possible through the Project pane/window, you can load SQLite databases using the Make Feature Layer tool either through the GUI or ArcPy.  At least during beta testing, Spatialite-based spatial data wouldn't load because the correct DLLs weren't packaged with the installer, not sure if that changed.  I have successfully loading ST_Geometry and GeoPackage spatial data into ArcGIS Pro.

LarsLarsen
New Contributor II

Just tested the Make Feature Layer Tool on version 1.0 and it does not see sqlite as a valid data source in the GUI. I could also not make it work using scripting directly, but that could be for other reasons as the error message is quite generic.

Strange though, because looking in the Pro folder structure both sqlite3 and ST_Geometry dlls are distributed with Pro.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Are you trying to load spatial data or just a table?  Was the SQLite database created by ArcGIS Desktop or some other application?  If the latter, try making a SQLite database from ArcGIS Desktop and putting some data in it, and then see if ArcGIS Pro sees that database, especially if working with spatial data.

0 Kudos
LarsLarsen
New Contributor II

Thanks Josh, I am trying both simple table and spatial data. Also tried to start of with a SQLite created by ArcGIS. It doesn't make any difference. In the GUI neither the extension .sqlite or .gpkg is recognized in pro, but works fine in ArcMAp 10.3 with the same tools.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

The tool won't "see" the SQLite database for the same reason the Project pane doesn't; however, the tool works with them.  Don't rely on the tools Browse button, fully specify the path to the table in the SQLite database in the Input Features text box.

LarsLarsen
New Contributor II

I have tried almost every combination for entering the SQLite path and feature class as input argument to the tool. Both in GUI and from Py scripting. The py script tests OK in ArcMap but not in PRO. PRO will give me and 'unsupported or does not exist' error message.

Josh, did you succeed with this method in the release version of PRO?

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I am using ArcGIS Pro 1.0.0.  Yes, it works, I tested it before posting the other day.  I just tested it again, and it worked without any issues:

arcpy.MakeFeatureLayer_management(r"D:\tmp\test.sqlite\webMerc1","webMerc")
<Result 'webMerc'>

It is helpful if you can post specific code and error messages, especially since it keeps not working for you.

I am not sure what is different between our machines.  I recently re-imaged my machine using Windows 7 64-bit Enterprise Edition.  I installed ArcGIS 10.3 before I got around to putting ArcGIS Pro on the machine, but the installations should be compartmentalized from each other.  Anyhow, I was loading SQLite databases into Pro with the beta versions and pre-releases before I re-imaged my machine.

Have you tried creating a layer file in ArcGIS Desktop that points to a SQLite data source and then load that layer file into ArcGIS Pro?

As has been pointed out, SQLite isn't officially supported yet, so the best approach in the interim might be to find an alternate data store.

LanceShipman
Esri Regular Contributor

Sqlite, SpatiaLite and GeoPackages are not supported in Pro 1.0. They didn't make the cut. We are trying to get them into Pro 1.1.

Regards,

Lance Shipman

Geodata Product Engineer, File Geodatabase, Sqlite, Shapefile

Esri, Redlands, California

AsrujitSengupta
Regular Contributor III

As far as I know, the below workspaces are not yet supported with ArcGIS Pro:

  • Enterprise Databases (Netezza, Teradata, SQLite)
  • SQLite GDB (only supported as part of map packages and offline editing)

Presently supported Workspaces should be --

  • File Geodatabase
  • Compressed File Geodatabases 
  • Feature Service Layers 
  • Enterprise Geodatabases (Oracle, SQL Server, PostgreSQL, DB2)
0 Kudos