2.6 KiB
2.6 KiB
Direct Run
1. Create a spark cluster and Run databricks notebook
Direct run sample shows how you can a spark cluster and run a databricks notebook.
- Upload basic1.ipynb
- Update
notebook_path
insamples/1_direct_run/run_basic1.yaml
file
- Apply
samples/1_direct_run/run_basic1.yaml
2. Create an interactive spark cluster and Run a databricks job on that cluster
Databricks periodic job sample shows how you can create an interactive spark cluster in databricks and attach it to one or many databricks notebooks.
-
Apply
samples/2_job_run/cluster_interactive1.yaml
file -
Update
existing_cluster_id
insamples/2_job_run/run_basic1_periodic_on_existing_cluster.yaml
file -
Apply
samples/2_job_run/run_basic1_periodic_on_existing_cluster.yaml
3. Create Secret scopes, installing dependencies/libraries on spark cluster
Databricks twitter ingest sample shows how you can create secret scopes in databricks, install libraries on your cluster, run a job that ingests data and acts as a message producer and sends the message to eventhub.
- Upload eventhub_ingest.ipynb
- Upload twitter_ingest.ipynb
- Create eventhub namespace and eventhub in azure
- Setup your twitter deveopler account
- Replace
xxxxx
with correct values and create these two secrets
kubectl create secret generic twitter-secret --from-literal=TwitterAPIkey=xxxxx --from-literal=TwitterAPISecret=xxxxx --from-literal=TwitterAccessToken=xxxxx --from-literal=TwitterAccessSecret=xxxxx
kubectl create secret generic eventhubnamespace-secret --from-literal=EventhubNamespace=xxxxx --from-literal=SharedAccessKeyName=xxxxx --from-literal=SharedAccessKey=xxxxx --from-literal=ConnectionString=Endpoint=sb://xxxxx.servicebus.windows.net/;SharedAccessKeyName=xxxxx;SharedAccessKey=xxxxx
- Apply
samples/3_secret_scope/secretscope_twitter.yaml
- Apply
samples/3_secret_scope/secretscope_eventhub.yaml
- Apply
samples/2_job_run/cluster_interactive1.yaml
file if you haven't already - Update
existing_cluster_id
insamples/3_secret_scope/run_twitter1.yaml
file - Apply
samples/3_secret_scope/run_twitter1.yaml