diff --git a/samples/geospatial/Python UDFs/PY_LOAD_GEOFILES.sql b/samples/geospatial/Python UDFs/PY_LOAD_GEOFILES.sql index 68f24b8..52f8c56 100644 --- a/samples/geospatial/Python UDFs/PY_LOAD_GEOFILES.sql +++ b/samples/geospatial/Python UDFs/PY_LOAD_GEOFILES.sql @@ -63,3 +63,11 @@ to_geography(wkb, True) as geometry, properties:Name::string as Name, properties:altitudeMode::string as altitudeMode from table(PY_LOAD_GEOFILE(build_scoped_file_url(@tmobile, 'archive_name.zip'), 'file_name.kml')); + +-- === Example execution (OGC GeoPackage) === +-- Note: A specific layer in the .gpkg file is opened by specifying layer name in UDTF `with zip.open(filename,layer=layername) as collection:` +SELECT + properties:Field_1::string as field_1, + properties:Field_2::string as Field_2, + to_geography(wkb, True) as geometry +FROM table(PY_LOAD_GEOFILE(build_scoped_file_url(@stage_name, 'archive_name.zip'), 'file_name.gpkg'));