This repository is an custom OpenMetadata Connector for GIS data formats.
We'll need to package the code so that it can be shipped to the ingestion container and used there. You can find a simple setup.py that builds the connector module.
If you want to use the connector from the UI, the openmetadata-ingestion image should be aware of your new package.
We will be running the against the OpenMetadata version 1.4.4, therefore, our Dockerfile looks like:
# Base image from the right version
FROM openmetadata/ingestion:1.4.4
# Let's use the same workdir as the ingestion image
WORKDIR /ingestion
USER airflow
# Install our custom connector
COPY connector connector
COPY setup.py .
RUN pip install --no-deps .
RUN pip install fiona
RUN pip install rasterioBuild and use the new openmetadata-ingestion images in Docker compose:
ingestion:
container_name: openmetadata_ingestion
build:
context: ../
dockerfile: docker/DockerfileWe have a Makefile prepared for you to run make run. This will get OpenMetadata up in Docker Compose using the custom Ingestion image.
You may also just run:
docker compose -f ./docker/docker-compose.yml up -dIn this guide we prepared a Database Connector. Thus, go to Database Services > Add New Service > Custom and set the Source Python Class Name as connector.spatial_connector.SpatialConnector.
Note how we are specifying the full module name so that the Ingestion Framework can import the Source class.
To run the OpenMetadata Spatial Connector, the Python class will be connector.spatial_connector.SpatialConnector and we'll need to set the following Connection Options:
skip: Comma-separated list of file extensions that should be skipped. Can be omitted otherwise.search_directory: The path or URL to a vector/raster file or folder containing multiple vector/raster files. The connector uses Fiona and Rasterio which support GDAL VFS.remote:trueifsearch_directoryis a vfs url, e.g.zip+https://raw.githubusercontent.com/OSGeo/gdal/master/autotest/ogr/data/shp/poly.zipor/vsizip//vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/master/autotest/ogr/data/shp/poly.zip. Can be omitted otherwise.
Everyone is invited to get involved and contribute to the project.
Simply create a fork and pull request for code contributions or feel free to open an issue for any other contributions or issues.

