{"id":19705537,"url":"https://github.com/treeverse/lakefs-spark-extensions","last_synced_at":"2026-04-11T20:09:16.434Z","repository":{"id":189659965,"uuid":"680753888","full_name":"treeverse/lakefs-spark-extensions","owner":"treeverse","description":"Spark SQL extensions for lakeFS","archived":false,"fork":false,"pushed_at":"2023-10-24T08:02:34.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-27T17:30:51.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treeverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-20T09:42:09.000Z","updated_at":"2024-06-13T10:29:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"7d05fb61-b62a-4279-b3e5-3bd1efe70e28","html_url":"https://github.com/treeverse/lakefs-spark-extensions","commit_stats":null,"previous_names":["treeverse/lakefs-spark-extensions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/treeverse/lakefs-spark-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeverse%2Flakefs-spark-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeverse%2Flakefs-spark-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeverse%2Flakefs-spark-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeverse%2Flakefs-spark-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treeverse","download_url":"https://codeload.github.com/treeverse/lakefs-spark-extensions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeverse%2Flakefs-spark-extensions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31693303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-11T21:28:48.892Z","updated_at":"2026-04-11T20:09:16.419Z","avatar_url":"https://github.com/treeverse.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spark SQL Extensions for lakeFS\n\n## Usage\n\nIn order to use the Spark extensions, you will need to _load_ them and then\n_add_ them to Spark.\n\nFrom Maven Repository: _wait until we upload an initial version, until then\nsee [Development](#Development)\n\n\nAdd:\n\n```\n--conf spark.sql.extensions=io.lakefs.iceberg.extension.LakeFSSparkSessionExtensions \\\n--packages io.lakefs:spark-extensions:\u003cVERSION\u003e\n```\n\nto your `spark-*` command-line, or add this package to your\n`spark.jars.packages` configuration.\n\n### Development\n\nRun `sbt package`, then add\n\n```\n--conf spark.sql.extensions=io.lakefs.iceberg.extension.LakeFSSparkSessionExtensions \\\n--jars ./target/scala-2.12/lakefs-spark-extensions_2.12-0.1.0-SNAPSHOT.jar`\n```\n\n## Available extensions\n\n### Data diff\n\n`refs_data_diff` is a Spark SQL table-valued function.  The expression\n\n```sql\nrefs_data_diff(PREFIX, FROM_SCHEMA, TO_SCHEMA, TABLE)\n```\n\nyields a relation that compares the \"from\" table `PREFIX.FROM_SCHEMA.TABLE`\nwith the \"to\" table `PREFIX.TO_SCHEMA.TABLE`.  Elements of \"to\" but not\n\"from\" are _added_ and appear with `lakefs_change='+'`, elements of \"from\" but not\n\"to\" are _deleted_ and appear with `lakefs_change='-'`.\n\nFor instance,\n\n```sql\nSELECT lakefs_change, Player, COUNT(*) FROM refs_data_diff('lakefs', 'main~', 'main', 'db.allstar_games')\nGROUP BY lakefs_change, Player;\n```\n\nuses lakeFS Iceberg support to compute how many rows were changed for each\nplayer in the last commit.\n\nInternally this relation is exactly a `SELECT` expression.  For instance,\nyou can set up a view with it:\n\n```sql\nCREATE TEMPORARY VIEW diff_allstar_games_main_last_commit AS\n    refs_data_diff('lakefs', 'main~', 'main', 'db.allstar_games');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreeverse%2Flakefs-spark-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreeverse%2Flakefs-spark-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreeverse%2Flakefs-spark-extensions/lists"}