{"id":19422274,"url":"https://github.com/azavea/hiveless","last_synced_at":"2025-04-24T15:32:10.478Z","repository":{"id":39719358,"uuid":"427688018","full_name":"azavea/hiveless","owner":"azavea","description":"Scala API for Hive UDFs with the GIS extension","archived":false,"fork":false,"pushed_at":"2022-05-26T21:51:42.000Z","size":3773,"stargazers_count":8,"open_issues_count":6,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-03T07:12:22.974Z","etag":null,"topics":["geospatial","gis","scala","spark","typelevel"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azavea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-13T14:30:51.000Z","updated_at":"2024-12-03T14:52:38.000Z","dependencies_parsed_at":"2022-09-10T19:31:45.369Z","dependency_job_id":null,"html_url":"https://github.com/azavea/hiveless","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fhiveless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fhiveless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fhiveless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fhiveless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azavea","download_url":"https://codeload.github.com/azavea/hiveless/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250654440,"owners_count":21465884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geospatial","gis","scala","spark","typelevel"],"created_at":"2024-11-10T13:33:01.738Z","updated_at":"2025-04-24T15:32:10.140Z","avatar_url":"https://github.com/azavea.png","language":"Scala","readme":"# Hiveless\n\n[![CI](https://github.com/azavea/hiveless/actions/workflows/ci.yml/badge.svg)](https://github.com/azavea/hiveless/actions/workflows/ci.yml)\n[![Maven Badge](https://img.shields.io/maven-central/v/com.azavea/hiveless-core_2.12?color=blue)](https://search.maven.org/search?q=g:com.azavea%20and%20hiveless)\n[![Snapshots Badge](https://img.shields.io/nexus/s/https/oss.sonatype.org/com.azavea/hiveless-core_2.12)](https://oss.sonatype.org/content/repositories/snapshots/com/azavea/hiveless-core_2.12/)\n\nHiveless is a Scala library for working with [Spark](https://spark.apache.org/) and [Hive](https://hive.apache.org/) using a more expressive typed API.\nIt adds typed HiveUDFs and implements Spatial Hive UDFs. It consists of the following modules:\n\n* `hiveless-core` with the typed Hive UDFs API and the initial base set of codecs\n* `hiveless-jts` with the TWKB JTS encoding support\n* `hiveless-spatial` with Hive GIS UDFs (depends on [GeoMesa](https://github.com/locationtech/geomesa))\n* `hiveless-spatial-index` with extra Hive GIS UDFs that may be used for the GIS indexing purposes (depends on [GeoMesa](https://github.com/locationtech/geomesa) and [GeoTrellis](https://github.com/locationtech/geotrellis))\n  * There is also a forked release [CartoDB/analytics-toolbox-databricks](https://github.com/CartoDB/analytics-toolbox-databricks), which is a complete `hiveless-spatial` and `hiveless-spatial-index` copy at this point. However, it may contain an extended GIS functionality in the future.\n\n## Quick Start\n\nTo use Hiveless in your project add the following in your `build.sbt` file as needed:\n\n```scala\nresolvers ++= Seq(\n  // for snapshot artifacts only\n  \"oss-sonatype\" at \"https://oss.sonatype.org/content/repositories/snapshots\"\n)\n\nlibraryDependencies ++= List(\n  \"com.azavea\" %% \"hiveless-core\"          % \"\u003clatest version\u003e\",\n  \"com.azavea\" %% \"hiveless-spatial\"       % \"\u003clatest version\u003e\",\n  \"com.azavea\" %% \"hiveless-spatial-index\" % \"\u003clatest version\u003e\"\n)\n```\n\n## Hiveless Spatial supported GIS functions\n\n```sql\nCREATE OR REPLACE FUNCTION st_geometryFromText as 'com.azavea.hiveless.spatial.ST_GeomFromWKT';\nCREATE OR REPLACE FUNCTION st_intersects as 'com.azavea.hiveless.spatial.ST_Intersects';\nCREATE OR REPLACE FUNCTION st_simplify as 'com.azavea.hiveless.spatial.ST_Simplify';\n -- ...and more\n```\n\nThe full list of supported functions can be found [here](./spatial/sql/createUDFs.sql).\n\n## Spatial Query Optimizations\n\nThere are two types of supported optimizations: `ST_Intersects` and `ST_Contains`, which allow Spark to push down predicates when possible.\n\nTo enable optimizations:\n\n```scala\nimport com.azavea.hiveless.spark.sql.rules.SpatialFilterPushdownRules\n\nval spark: SparkSession = ???\nSpatialFilterPushdownRules.registerOptimizations(sparkContext.sqlContext)\n```\n\nIt is also possible to set it through the Spark configuration via the optimizations injector:\n\n```scala\nimport com.azavea.hiveless.spark.sql.SpatialFilterPushdownOptimizations\n\nval conf: SparkConfig = ???\nconfig.set(\"spark.sql.extensions\", classOf[SpatialFilterPushdownOptimizations].getName)\n```\n\n## License\nCode is provided under the Apache 2.0 license available at http://opensource.org/licenses/Apache-2.0,\nas well as in the LICENSE file. This is the same license used as Spark.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazavea%2Fhiveless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazavea%2Fhiveless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazavea%2Fhiveless/lists"}