2

I have a geopackage comprising spatial and nonsapatial tables. I would like to be able to load all of the tables into an ArcGIS Pro 2.6 project, however, when I connect to the geopackage I'm only able to load the spatial tables. Likewise, iterating through the geopackage using:

gpkg = "test.gpkg"

walk = arcpy.da.Walk(gpkg)

for path, names, filenames in walk:
    for fname in filenames:
        d = arcpy.Describe(os.path.join(path, fname))
        print(fname, d.dataType)

returns only the spatial tables.

Is there anyway to make non-spatial tables visible within ArcGIS Pro?

0

I realised the issue was due to the script being used to generate the geopackage not correctly populating the gpkg_contents field for non-spatial tables. With this updated the non-spatial tables now appear when a connection is made within ArcGIS Pro.

Using the attributes for non-spatial tables as shown here: http://www.geopackage.org/spec120/#attributes , you can update gpkg_contents as follows:

INSERT INTO gpkg_contents(table_name, data_type, identifier)
VALUES ('name', 'attributes', 'identifier');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.