{"id":28528119,"url":"https://github.com/gcdev373/example-spark-datasourcev2","last_synced_at":"2026-05-01T02:31:31.999Z","repository":{"id":220541398,"uuid":"197571741","full_name":"gcdev373/example-spark-datasourcev2","owner":"gcdev373","description":"A very simple Java implementation of the Spark DataSourceV2 API.","archived":false,"fork":false,"pushed_at":"2021-05-24T08:42:22.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-06T16:41:06.678Z","etag":null,"topics":["datasource","example","spark","spark-sql","sparksql"],"latest_commit_sha":null,"homepage":"","language":"Java","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/gcdev373.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-07-18T11:12:01.000Z","updated_at":"2023-08-10T03:53:56.000Z","dependencies_parsed_at":"2024-02-02T17:05:35.807Z","dependency_job_id":null,"html_url":"https://github.com/gcdev373/example-spark-datasourcev2","commit_stats":null,"previous_names":["gcdev373/example-spark-datasourcev2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gcdev373/example-spark-datasourcev2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcdev373%2Fexample-spark-datasourcev2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcdev373%2Fexample-spark-datasourcev2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcdev373%2Fexample-spark-datasourcev2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcdev373%2Fexample-spark-datasourcev2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcdev373","download_url":"https://codeload.github.com/gcdev373/example-spark-datasourcev2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcdev373%2Fexample-spark-datasourcev2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32483406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["datasource","example","spark","spark-sql","sparksql"],"created_at":"2025-06-09T12:16:53.139Z","updated_at":"2026-05-01T02:31:31.994Z","avatar_url":"https://github.com/gcdev373.png","language":"Java","readme":"\u003c!---\n *\n * Copyright 2019 Crown Copyright\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n---\u003e\n# example-spark-datasourcev2\nA very simple Java implementation of the Apache Spark DataSourceV2 API.\n\nThis example is compatible with **Spark 2.4.3.**\n\n# Building\nThe jar file containing the DataSource is built with the following command\n```text\n$ mvn package\n```\n\n# Testing\nThe DataSource can be demonstrated from the pyspark shell.\n\nPyspark should be launched with the following command:\n```text\n$ pyspark --jars ./target/example-datasource-1.0.jar\n```\nYou should see something like\n```text\nWelcome to\n      ____              __\n     / __/__  ___ _____/ /__\n    _\\ \\/ _ \\/ _ `/ __/  '_/\n   /__ / .__/\\_,_/_/ /_/\\_\\   version 2.4.3\n      /_/\n\nUsing Python version 3.7.3 (default, Jun 24 2019 04:54:02)\nSparkSession available as 'spark'.\n```\nThen from within the pyspark shell, type the commands below:\n```text\n\u003e\u003e\u003e df = spark.read.format('example.ExampleDataSource').load()\n\u003e\u003e\u003e df.show()\n```\nIn order to display the data provided by the DataSource\n```text\n+-------+---+\n|   name|age|\n+-------+---+\n|  Alfie| 24|\n| Bertie| 36|\n|Charlie| 48|\n| Debbie| 60|\n|  Ernie| 72|\n|Frankie| 84|\n| Gettie| 96|\n+-------+---+\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcdev373%2Fexample-spark-datasourcev2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcdev373%2Fexample-spark-datasourcev2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcdev373%2Fexample-spark-datasourcev2/lists"}