Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 215
Update the lakeflow-pipelines template according to the latest Lakeflow conventions#3558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
181627da7f1447a7ff123ea97b0cd3acf6175bd17fd708592fbb1617e588d1fbc9a90fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "recommendations": [ | ||
| "databricks.databricks", | ||
| "ms-python.vscode-pylance", | ||
| "redhat.vscode-yaml" | ||
| "redhat.vscode-yaml", | ||
| "ms-python.black-formatter" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| fromdatabricks.sdk.runtimeimportspark | ||
| frompyspark.sqlimportDataFrame | ||
| deffind_all_taxis() ->DataFrame: | ||
| """Find all taxi data.""" | ||
| returnspark.read.table("samples.nyctaxi.trips") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4,5 +4,7 @@ dist/ | ||
| __pycache__/ | ||
| *.egg-info | ||
| .venv/ | ||
| scratch/** | ||
| !scratch/README.md | ||
| **/explorations/** | ||
| **/!explorations/README.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| This folder is reserved for Databricks Asset Bundles resource definitions. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,15 @@ | ||
| # The main pipeline for my_lakeflow_pipelines | ||
| resources: | ||
| pipelines: | ||
| {{template `pipeline_name` .}}: | ||
| name: {{template `pipeline_name` .}} | ||
| serverless: true | ||
| channel: "PREVIEW" | ||
| lakeflow_pipelines_etl: | ||
| name: lakeflow_pipelines_etl | ||
| ## Catalog is required for serverless compute | ||
| catalog: ${var.catalog} | ||
| schema: ${var.schema} | ||
| serverless: true | ||
| root_path: "." | ||
lennartkats-db marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| libraries: | ||
| - glob: | ||
| include: transformations/** | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,21 @@ | ||
| # The job that triggers my_lakeflow_pipelines_pipeline. | ||
| # The job that triggers lakeflow_pipelines_etl. | ||
| resources: | ||
| jobs: | ||
| my_lakeflow_pipelines_job: | ||
| name: my_lakeflow_pipelines_job | ||
| lakeflow_pipelines_job: | ||
| name: lakeflow_pipelines_job | ||
| trigger: | ||
| # Run this job every day, exactly one day from the last run; see https://docs.databricks.com/api/workspace/jobs/create#trigger | ||
| periodic: | ||
| interval: 1 | ||
| unit: DAYS | ||
| email_notifications: | ||
| on_failure: ${var.notifications} | ||
| #email_notifications: | ||
fjakobs marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| # on_failure: | ||
| # - your_email@example.com | ||
| tasks: | ||
| - task_key: refresh_pipeline | ||
| pipeline_task: | ||
| pipeline_id: ${resources.pipelines.my_lakeflow_pipelines_pipeline.id} | ||
| pipeline_id: ${resources.pipelines.lakeflow_pipelines_etl.id} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,12 @@ | ||
| import dlt | ||
| from pyspark import pipelines as dp | ||
| from pyspark.sql.functions import col | ||
| from utilities import utils | ||
| # This file defines a sample transformation. | ||
| # Edit the sample below or add new transformations | ||
| # using "+ Add" in the file browser. | ||
| @dlt.table | ||
| @dp.table | ||
| def sample_trips_my_lakeflow_pipelines(): | ||
| return spark.read.table("samples.nyctaxi.trips").withColumn("trip_distance_km", utils.distance_km(col("trip_distance"))) | ||
| return spark.read.table("samples.nyctaxi.trips") |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "recommendations": [ | ||
| "databricks.databricks", | ||
| "ms-python.vscode-pylance", | ||
| "redhat.vscode-yaml" | ||
| "redhat.vscode-yaml", | ||
| "ms-python.black-formatter" | ||
| ] | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.