{"id":20911515,"url":"https://github.com/anant/example-airflow-dataproc-astra","last_synced_at":"2025-06-12T04:06:19.554Z","repository":{"id":112529250,"uuid":"537533671","full_name":"Anant/example-airflow-dataproc-astra","owner":"Anant","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-18T13:46:45.000Z","size":21278,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-12T22:23:57.767Z","etag":null,"topics":["airflow","apache-airflow","dataproc","datastax","datastax-astra","gitpod","google-dataproc"],"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/Anant.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":"2022-09-16T16:21:11.000Z","updated_at":"2022-09-18T13:48:22.000Z","dependencies_parsed_at":"2023-05-15T17:00:20.910Z","dependency_job_id":null,"html_url":"https://github.com/Anant/example-airflow-dataproc-astra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Anant/example-airflow-dataproc-astra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anant%2Fexample-airflow-dataproc-astra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anant%2Fexample-airflow-dataproc-astra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anant%2Fexample-airflow-dataproc-astra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anant%2Fexample-airflow-dataproc-astra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anant","download_url":"https://codeload.github.com/Anant/example-airflow-dataproc-astra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anant%2Fexample-airflow-dataproc-astra/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259394809,"owners_count":22850806,"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":["airflow","apache-airflow","dataproc","datastax","datastax-astra","gitpod","google-dataproc"],"created_at":"2024-11-18T14:22:13.473Z","updated_at":"2025-06-12T04:06:19.510Z","avatar_url":"https://github.com/Anant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airflow, Dataproc, and DataStax Astra\nIn this demo, we will show you how to do the following all orchestrated by Airflow\n1. Create a Dataproc cluster\n2. Submit a Scala Spark Job that runs a `select * from database.keyspace.table` against Astra\n3. Destroy Dataproc cluster upon job completion\n\nIf you want to modify the Scala Spark Jar, you can reference `spark-cassandra.scala` and the comments within the file.\n\n## Click below to get started!\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Anant/example-airflow-dataproc-astra)\n\n### 1. Google Cloud Storage Bucket Setup\n\n#### 1.1 Create a Google Cloud Storage Bucket: (https://console.cloud.google.com/storage/browser)\n#### 1.2 Download and upload the `spark-cassandra-assembly-0.1.0-SNAPSHOT.jar` to your bucket\n#### 1.3 Download and upload the your database's secure-connect-\u003cdb_name\u003e.zip to your bucket\n#### 1.4 Copy and paste down the `gsutil URI`'s for both of the files\n\n### 2. Create and upload service account keyfile json to working directory\n[Documentation on how to do so](https://cloud.google.com/iam/docs/creating-managing-service-account-keys)\n\n### 3. Update Google Connection in Airflow\n#### 3.1 When prompted in the lower right-hand corner for `port 8080`, click `open browser`\nAirflow credentials are `admin` `admin`\n#### 3.2 Go to Admin -\u003e Connections -\u003e google_cloud_default\n\n#### 3.3 Copy the full path of the keyfile.json and paste into the `Keyfile Path` section of the Google connection setup and save.\n\n### 4. Update Variables\n\n#### 4.1 Go to Admin -\u003e Variables\n\n#### 4.2 Update the values of all of the variables that we imported ahead of time.\nReference comments in poc.py if unsure\n\n### 5. Turn on `example_airflow_google_dataproc_astra` DAG and run\n\n### 6. Confirm cluster is being created in Google Dataproc (https://console.cloud.google.com/dataproc/clusters)\n\n### 7. Once `spark_submit` task begins in Airflow, click on the job that is in the starting/running state (https://console.cloud.google.com/dataproc/jobs)\n\n### 8. Confirm a dataframe containing data from `database.keyspace.table` is shown in the job's log\n\n### 9. After spark_submit task completion, confirm the cluster is being destroyed / is destroyed in Google Dataproc\n\n### 10. Delete Google Cloud Storage bucket as needed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanant%2Fexample-airflow-dataproc-astra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanant%2Fexample-airflow-dataproc-astra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanant%2Fexample-airflow-dataproc-astra/lists"}