{"id":19081531,"url":"https://github.com/tuancamtbtx/python-spark-example","last_synced_at":"2025-02-22T06:13:45.749Z","repository":{"id":132474185,"uuid":"201517304","full_name":"tuancamtbtx/python-spark-example","owner":"tuancamtbtx","description":"Spark template to submit to cluster","archived":false,"fork":false,"pushed_at":"2019-12-20T03:35:05.000Z","size":1953,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T20:19:19.801Z","etag":null,"topics":["python","spark"],"latest_commit_sha":null,"homepage":"","language":"Python","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/tuancamtbtx.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-09T18:00:41.000Z","updated_at":"2024-07-02T04:54:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a01c6d4-5fca-49df-9326-50b8d94fab05","html_url":"https://github.com/tuancamtbtx/python-spark-example","commit_stats":null,"previous_names":["tuancamtbtx/python-spark-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuancamtbtx%2Fpython-spark-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuancamtbtx%2Fpython-spark-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuancamtbtx%2Fpython-spark-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuancamtbtx%2Fpython-spark-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuancamtbtx","download_url":"https://codeload.github.com/tuancamtbtx/python-spark-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240131746,"owners_count":19752727,"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":["python","spark"],"created_at":"2024-11-09T02:36:44.308Z","updated_at":"2025-02-22T06:13:45.730Z","avatar_url":"https://github.com/tuancamtbtx.png","language":"Python","readme":"\n## requirements  \nSpark with pyspark\n\n## spark-submit with pyspark simple template\nA simple usage example of pyspark with spark-submit, including:  \n- passing arguments\n- creating spark context and sql context\n- loading your project source code (src directory )\n- loading pip modules (with simple requirements file) \n\n\n## preparing libraries (source and pip modules)\nfrom terminal, run:  \n```pip install -r ./requirements.txt -t ./pip_modules \u0026\u0026 jar -cvf pip_modules.jar -C ./pip_modules .   ```\n```jar -cvf src.jar -C ./src .   ```\n\n## running spark-submit\nfrom terminal, run:  \n```spark-submit main.py --some_arg=some_value --pip_modules=pip_modules.jar --src=src.jar  ```\n\n\n## running pyspark interactive shell with pip modules and source code\n- run: pyspark\n- from within pyspark interactive shell, run the following:   \n```sc.addPyFile(\"src.jar\")```   \n```sc.addPyFile(\"pip_modules.jar\")```   \n\n# \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuancamtbtx%2Fpython-spark-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuancamtbtx%2Fpython-spark-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuancamtbtx%2Fpython-spark-example/lists"}