Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "okdp-examples",
"version": "1.0.0",
"version": "1.1.0",
"description": "okdp-examples docker image",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions helm/okdp-examples/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
apiVersion: v2
type: application
name: okdp-examples
version: 1.1.0
version: 1.1.1
sources:
- https://github.com/okdp/okdp-examples
appVersion: "1.1.0"
appVersion: "1.1.1"
description: |
A collection of hands-on examples, helper utilities, Jupyter notebooks, and data workflows
that showcases how to work with the OKDP Platform.
Expand Down
61 changes: 29 additions & 32 deletions helm/okdp-examples/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# okdp-examples

![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.1](https://img.shields.io/badge/AppVersion-1.1.1-informational?style=flat-square)

A collection of hands-on examples, helper utilities, Jupyter notebooks, and data workflows
that showcases how to work with the OKDP Platform.
Expand All @@ -19,37 +19,34 @@ that showcases how to work with the OKDP Platform.

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| commands.01-prepare_env.01-create-spark-event-log-dir | string | `"echo \"👉 Connect into S3\"\nmc alias set myminio $S3_ENDPOINT \"$S3_ACCESS_KEY\" \"$S3_SECRET_KEY\"\necho \"👉 MinIO alias configured successfully.\"\necho \"👉 Normalize the log directory $SPARK_EVENT_LOG_DIRECTORY\"\nno_scheme=\"${SPARK_EVENT_LOG_DIRECTORY#s3a://}\"\nno_scheme=\"${no_scheme%/}\"\nbucket=\"${no_scheme%%/*}\"\nprefix=\"${no_scheme#${bucket}}\"\nprefix=\"${prefix#/}\"\necho \"👉 Bucket: $bucket, Prefix: $prefix\"\necho \"👉 Create the bucket $bucket if not exist\"\nmc mb myminio/$bucket || true\necho \"👉 upload a zero-byte object to create the prefix: ${bucket}/${prefix}/.keep\"\nmc pipe \"myminio/${bucket}/${prefix}/.keep\" < /dev/null\necho \"✅ Spark events log directory $SPARK_EVENT_LOG_DIRECTORY successfully created.\";\n"` | |
| commands.02-nyc_trip."03-nyc-tripdata-trino-external-tables.sql" | string | `"trino --server ${TRINO_SERVER_URL} --insecure <<SQL\n CREATE SCHEMA IF NOT EXISTS lakehouse.nyc_tripdata;\n\n CREATE TABLE IF NOT EXISTS lakehouse.nyc_tripdata.yellow (\n vendorid INT,\n tpep_pickup_datetime TIMESTAMP,\n tpep_dropoff_datetime TIMESTAMP,\n passenger_count INT,\n trip_distance DOUBLE,\n ratecodeid INT,\n store_and_fwd_flag VARCHAR,\n pulocationid INT,\n dolocationid INT,\n payment_type INT,\n fare_amount DOUBLE,\n extra DOUBLE,\n mta_tax DOUBLE,\n tip_amount DOUBLE,\n tolls_amount DOUBLE,\n improvement_surcharge DOUBLE,\n total_amount DOUBLE,\n congestion_surcharge DOUBLE,\n airport_fee DOUBLE,\n cbd_congestion_fee DOUBLE,\n month VARCHAR\n )\n WITH (\n external_location = 's3a://${BUCKET}/${BUCKET_PREFIX}/yellow/',\n format = 'PARQUET',\n partitioned_by = ARRAY['month']\n );\n\n CREATE TABLE IF NOT EXISTS lakehouse.nyc_tripdata.green (\n vendorid INT,\n lpep_pickup_datetime TIMESTAMP,\n lpep_dropoff_datetime TIMESTAMP,\n store_and_fwd_flag VARCHAR,\n ratecodeid INT,\n pulocationid INT,\n dolocationid INT,\n passenger_count INT,\n trip_distance DOUBLE,\n fare_amount DOUBLE,\n extra DOUBLE,\n mta_tax DOUBLE,\n tip_amount DOUBLE,\n tolls_amount DOUBLE,\n improvement_surcharge DOUBLE,\n total_amount DOUBLE,\n payment_type INT,\n trip_type INT,\n congestion_surcharge DOUBLE,\n cbd_congestion_fee DOUBLE,\n month VARCHAR\n )\n WITH (\n external_location = 's3a://${BUCKET}/${BUCKET_PREFIX}/green/',\n format = 'PARQUET',\n partitioned_by = ARRAY['month']\n );\n\n CREATE TABLE IF NOT EXISTS lakehouse.nyc_tripdata.fhv (\n dispatching_base_num VARCHAR,\n pickup_datetime TIMESTAMP,\n dropoff_datetime TIMESTAMP,\n pulocationid INT,\n dolocationid INT,\n sr_flag INT,\n affiliated_base_number VARCHAR,\n month VARCHAR\n )\n WITH (\n external_location = 's3a://${BUCKET}/${BUCKET_PREFIX}/fhv/',\n format = 'PARQUET',\n partitioned_by = ARRAY['month']\n );\nSQL\n"` | |
| commands.02-nyc_trip.01-download-nyc-tripdata | string | `"mkdir -p /data/tripdata\ncd /data/tripdata;\nfor dataset in yellow green fhv; do\n for month in 01 02 03; do\n file=\"${dataset}_tripdata_2025-${month}.parquet\";\n url=\"$DATA_URL/$file\";\n echo \"→ $url\";\n if curl -fsSLO \"$url\"; then\n echo \"✅ Downloaded: $file\";\n else\n echo \"⚠️ Missing: $file\";\n fi;\n done;\ndone;\nls -lh /data/tripdata\necho \"✅ All downloads complete.\";\n"` | |
| commands.02-nyc_trip.02-upload-nyc-tripdata-into-s3 | string | `"echo \"👉 Connect into S3\"\nmc alias set myminio $S3_ENDPOINT \"$S3_ACCESS_KEY\" \"$S3_SECRET_KEY\"\necho \"👉 MinIO alias configured successfully.\"\n### echo \"👉 Clean the examples folder if it exists\"\n### mc rm --recursive --force myminio/$BUCKET/examples\necho \"👉 Create the bucket if not exist\"\nmc mb myminio/$BUCKET || true\necho \"👉 Upload sample files into the correct folders\"\n\nfor category in yellow green fhv; do\n echo \"🚀 Processing category: $category\"\n for file in /data/tripdata/${category}_*.parquet; do\n [ -e \"$file\" ] || continue # skip if no files match\n month=$(basename \"$file\" | sed -E 's/.*_([0-9]{4}-[0-9]{2})\\.parquet/\\1/')\n echo \"📦 Uploading $file → ${BUCKET_PREFIX}/$category/month=$month/\"\n mc cp \"$file\" \"myminio/$BUCKET/${BUCKET_PREFIX}/$category/month=$month/\"\n done\ndone\n\necho \"👉 Verify bucket structure\"\nmc tree myminio/$BUCKET\nmc ls --recursive myminio/$BUCKET\n"` | |
| commands.02-nyc_trip.04-nyc-tripdata-trino-synchronize-partitions | string | `"trino --server ${TRINO_SERVER_URL} --insecure <<SQL\n CALL lakehouse.system.sync_partition_metadata(\n schema_name => 'nyc_tripdata',\n table_name => 'yellow',\n mode => 'ADD'\n );\n CALL lakehouse.system.sync_partition_metadata(\n schema_name => 'nyc_tripdata',\n table_name => 'green',\n mode => 'ADD'\n );\n CALL lakehouse.system.sync_partition_metadata(\n schema_name => 'nyc_tripdata',\n table_name => 'fhv',\n mode => 'ADD'\n );\nSQL\n"` | |
| commands.02-nyc_trip.05-nyc-tripdata-trino-validate | string | `"trino --server ${TRINO_SERVER_URL} --insecure <<SQL\n SHOW SCHEMAS FROM lakehouse;\n\n SHOW TABLES FROM lakehouse.nyc_tripdata;\n\n DESCRIBE lakehouse.nyc_tripdata.yellow;\n DESCRIBE lakehouse.nyc_tripdata.green;\n DESCRIBE lakehouse.nyc_tripdata.fhv;\n\n SELECT *\n FROM lakehouse.nyc_tripdata.yellow\n LIMIT 10;\nSQL\n"` | |
| extraEnvRaw | list | `[]` | Extra environment variables in RAW format that will be passed into pods |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"quay.io/okdp/okdp-examples"` | |
| image.tag | string | `"latest"` | |
| imagePullSecrets | list | `[]` | |
| job.annotations."helm.sh/hook" | string | `"post-install,post-upgrade"` | |
| job.annotations."helm.sh/hook-delete-policy" | string | `"before-hook-creation"` | |
| job.backoffLimit | int | `2` | |
| job.restartPolicy | string | `"Never"` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automount | bool | `true` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| tolerations | list | `[]` | |
| volumeMounts | list | `[]` | |
| volumes | list | `[]` | |
| affinity | object | `{}` | Affinity rules for scheduling the Job pod. |
| commands | object | `{}` | Ordered command groups executed by the examples Job. The first-level key is the phase/group name, and the second-level key is the command step name. Each value is a shell script snippet. |
| extraEnvRaw | list | `[]` | Extra environment variables in raw Kubernetes env format injected into the Job container. |
| fullnameOverride | string | `""` | Override the fully qualified release name. |
| image | object | `{"pullPolicy":"Always","repository":"quay.io/okdp/okdp-examples","tag":"latest"}` | Container image configuration for the examples Job. |
| image.pullPolicy | string | `"Always"` | Kubernetes image pull policy. |
| image.repository | string | `"quay.io/okdp/okdp-examples"` | OCI image repository for the examples container. |
| image.tag | string | `"latest"` | Image tag to use. Defaults are not inferred here; this value is explicit. |
| imagePullSecrets | list | `[]` | Image pull secrets for private registries. |
| job | object | `{"annotations":{"helm.sh/hook":"post-install,post-upgrade","helm.sh/hook-delete-policy":"before-hook-creation"},"backoffLimit":2,"restartPolicy":"Never"}` | Kubernetes Job configuration. |
| job.annotations | object | `{"helm.sh/hook":"post-install,post-upgrade","helm.sh/hook-delete-policy":"before-hook-creation"}` | Annotations applied to the Job metadata, typically used for Helm hooks. |
| job.backoffLimit | int | `2` | Number of retries before the Job is considered failed. |
| job.restartPolicy | string | `"Never"` | Pod restart policy for the Job. |
| nameOverride | string | `""` | Override the chart name. |
| nodeSelector | object | `{}` | Node selector constraints for scheduling the Job pod. |
| podAnnotations | object | `{}` | Additional annotations added to the pod template. |
| podLabels | object | `{}` | Additional labels added to the pod template. |
| podSecurityContext | object | `{}` | Pod-level security context. |
| resources | object | `{}` | Resource requests and limits for the Job container. |
| securityContext | object | `{}` | Container-level security context. |
| serviceAccount | object | `{"annotations":{},"automount":true,"create":true,"name":""}` | ServiceAccount configuration for the Job pod. |
| serviceAccount.annotations | object | `{}` | Additional annotations added to the ServiceAccount. |
| serviceAccount.automount | bool | `true` | Automatically mount the ServiceAccount token into the pod. |
| serviceAccount.create | bool | `true` | Specifies whether a ServiceAccount should be created. |
| serviceAccount.name | string | `""` | Name of the ServiceAccount to use. If empty and create=true, a name is generated. |
| tolerations | list | `[]` | Tolerations for scheduling the Job pod onto tainted nodes. |
| volumeMounts | list | `[]` | Additional volume mounts added to the Job container. |
| volumes | list | `[]` | Additional volumes added to the Job pod. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
18 changes: 18 additions & 0 deletions helm/okdp-examples/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
{{/*

Copyright 2026 The OKDP Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/}}

{{/*
Expand the name of the chart.
*/}}
Expand Down
32 changes: 17 additions & 15 deletions helm/okdp-examples/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#
# Copyright 2026 The OKDP Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{/*

Copyright 2026 The OKDP Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/}}

{{- $root := . }}
{{- $groupNames := sortAlpha (keys $root.Values.commands) }}
Expand Down
34 changes: 18 additions & 16 deletions helm/okdp-examples/templates/job.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#
# Copyright 2026 The OKDP Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{/*

Copyright 2026 The OKDP Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/}}

{{- $root := . }}
{{- $groupNames := sortAlpha (keys $root.Values.commands) }}
{{- $groupNames := sortAlpha (keys $root.Values.commands) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
32 changes: 17 additions & 15 deletions helm/okdp-examples/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#
# Copyright 2026 The OKDP Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{/*

Copyright 2026 The OKDP Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/}}

{{- if .Values.serviceAccount.create -}}
apiVersion: v1
Expand Down
Loading
Loading