Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andre-salvati/databricks-template
/ functions
Functions
113 in github.com/andre-salvati/databricks-template
⨍
Functions
113
◇
Types & classes
11
↳
Endpoints
1
↓ 9 callers
Method
get_value
(self, key)
src/template/config.py:128
↓ 8 callers
Method
cluster_by
Set Delta liquid-clustering keys on an existing table. Metadata-only and idempotent: re-running just re-asserts the keys. Subsequent
src/template/baseTask.py:10
↓ 7 callers
Function
_wheel_task
(include_load_test: bool = False)
scripts/sdk_generate_template_job.py:104
↓ 5 callers
Method
_build_name_updates
(self, seed_date: str)
src/template/job1/seed_sources.py:237
↓ 5 callers
Function
_retry_kwargs
(retries: int)
scripts/sdk_generate_template_job.py:151
↓ 4 callers
Method
_build_incremental_orders
(self, seed_date: str)
src/template/job1/seed_sources.py:195
↓ 4 callers
Function
_tags
(environment: str)
scripts/sdk_generate_template_job.py:127
↓ 4 callers
Method
filter
(self, record: logging.LogRecord)
src/template/config.py:28
↓ 4 callers
Function
run_sql
(workspace: WorkspaceClient, warehouse_id: str, sql: str)
scripts/_sdk_sql.py:33
↓ 3 callers
Function
_environments
()
scripts/sdk_generate_template_job.py:118
↓ 3 callers
Function
aggregate_orders
Aggregate enriched orders by the report dimensions. Mirrors GenerateOrdersAgg.aggregate_orders exactly. total_value sums item_total — th
src/template/job1_sdp/transforms.py:62
↓ 3 callers
Method
aggregate_orders
(self, df_order)
src/template/job1/generate_orders_agg.py:10
↓ 3 callers
Function
enrich_order
Four-way join: order_item ⨝ order ⨝ customer ⨝ product. Mirrors GenerateOrders.enrich_order exactly. product_name is read from the product
src/template/job1_sdp/transforms.py:16
↓ 3 callers
Method
enrich_order
(self, df_customer, df_order, df_order_item, df_product)
src/template/job1/generate_orders.py:10
↓ 3 callers
Function
get_warehouse_id
Resolve a SQL warehouse to use for DDL. Picking warehouses[0] is fragile — the API returns warehouses in an implementation-defined order, so
scripts/_sdk_sql.py:5
↓ 2 callers
Function
_alert_emails
()
scripts/sdk_generate_template_job.py:138
↓ 2 callers
Method
_build_customer_updates
(self, seed_date: str)
src/template/job1/seed_sources.py:222
↓ 2 callers
Method
_build_incremental_items
(self, seed_date: str)
src/template/job1/seed_sources.py:206
↓ 2 callers
Method
_products_renamed_on
The product ids selected for a rename on a given day, by a day-anchored rotation. Deterministic so reruns of the same date are idempotent.
src/template/job1/seed_sources.py:231
↓ 2 callers
Function
arg_parser
()
src/template/main.py:28
↓ 2 callers
Method
get_spark
(self)
src/template/config.py:125
↓ 2 callers
Method
run
(self)
src/template/job1/seed_sources.py:49
↓ 2 callers
Method
validate_order
(self, df_order)
src/template/job1/extract_source2.py:16
↓ 1 callers
Method
__init__
(self, args)
src/template/config.py:48
↓ 1 callers
Function
_build_job
(environment: str, sp_id: str | None)
scripts/sdk_generate_template_job.py:183
↓ 1 callers
Function
_build_job_integration_test
Integration test: setup → run (job1 batch) + run_sdp (pipeline) in parallel → validate. A single validate task waits for both run and run_sdp to
scripts/sdk_generate_template_job.py:310
↓ 1 callers
Function
_build_job_prod_integration
Prod integration job: seed_sources → run (job1 batch) + run_sdp (pipeline) in parallel. Mirrors the staging integration test structure but uses s
scripts/sdk_generate_template_job.py:377
↓ 1 callers
Function
_build_pipeline
(environment: str, catalog: str, sp_id: str | None)
scripts/sdk_generate_template_job.py:452
↓ 1 callers
Function
_configure_logging
(level: int, run_id: str)
src/template/config.py:33
↓ 1 callers
Function
_dqx_package
Read the DQX version from pyproject.toml so it stays in sync with the runtime dep.
scripts/sdk_generate_template_job.py:41
↓ 1 callers
Function
_drop_candidates
DROP statements to try in order. The kind-specific form first (when there is one), then plain DROP TABLE as a fallback for warehouses whose parser
scripts/sdk_drop_tables.py:27
↓ 1 callers
Method
_ensure_tables
(self, catalog: str)
src/template/job1/seed_sources.py:80
↓ 1 callers
Function
_existing_catalogs
(workspace: WorkspaceClient)
scripts/sdk_init_workspace.py:67
↓ 1 callers
Function
_existing_schemas
(workspace: WorkspaceClient, catalog: str)
scripts/sdk_init_workspace.py:71
↓ 1 callers
Function
_find_sp
(workspace: WorkspaceClient, display_name: str)
scripts/sdk_init_workspace.py:22
↓ 1 callers
Function
_get_service_principal_id
(display_name: str, profile: str)
scripts/sdk_generate_template_job.py:96
↓ 1 callers
Function
_product_category
Stable category attribute of a product, mirroring the Spark expression in _seed_initial: category = (product_id - 1) % 10 + 1. Used to build the n
src/template/job1/seed_sources.py:24
↓ 1 callers
Function
_product_unit_price
Static unit_price of a product, mirroring the Spark expression in _seed_initial. unit_price never changes after the initial load; it is carried on
src/template/job1/seed_sources.py:32
↓ 1 callers
Function
_project_version
Read version from pyproject.toml so the bundle pins to the exact built wheel.
scripts/sdk_generate_template_job.py:86
↓ 1 callers
Method
_reset_schemas
(self, catalog)
tests/job1/integration_setup.py:15
↓ 1 callers
Function
_resolve_catalog
Compute the target catalog at generation time, mirroring Config.__init__. - dev → dev_<sanitized_user> (per-developer sandbox) - stagin
scripts/sdk_generate_template_job.py:438
↓ 1 callers
Function
_resolve_catalog
(workspace: WorkspaceClient, env: str)
scripts/sdk_drop_tables.py:38
↓ 1 callers
Function
_retries
(environment: str)
scripts/sdk_generate_template_job.py:145
↓ 1 callers
Method
_seed_incremental
(self, catalog: str, seed_date: str)
src/template/job1/seed_sources.py:159
↓ 1 callers
Method
_seed_initial
(self, catalog: str, seed_date: str)
src/template/job1/seed_sources.py:99
↓ 1 callers
Method
_seed_load_test
(self, catalog)
tests/job1/integration_setup.py:53
↓ 1 callers
Method
_seed_standard
(self, catalog)
tests/job1/integration_setup.py:25
↓ 1 callers
Function
_target_overrides
Target-level run_as and root_path pinned to the SP for staging/prod. Two independent gates stack here: 1. Target-level run_as makes mode: p
scripts/sdk_generate_template_job.py:163
↓ 1 callers
Method
_validate_load_test
(self, catalog)
tests/job1/integration_validate.py:33
↓ 1 callers
Method
_validate_standard
(self, catalog)
tests/job1/integration_validate.py:14
↓ 1 callers
Function
analyze_job_costs
Analyze job costs for a specific date using system tables. Args: workspace: Databricks WorkspaceClient instance target_date:
scripts/sdk_analyze_job_costs.py:28
↓ 1 callers
Function
aws_daily_costs
(days: int, profile: str | None = None)
scripts/project_costs.py:19
↓ 1 callers
Function
create_catalogs_and_schemas
(workspace: WorkspaceClient, sp_id: str, storage_root: str | None, warehouse_id: str)
scripts/sdk_init_workspace.py:75
↓ 1 callers
Function
create_service_principal
(workspace: WorkspaceClient, display_name: str, warehouse_id: str)
scripts/sdk_init_workspace.py:29
↓ 1 callers
Function
databricks_daily_costs
(profile: str, days: int)
scripts/project_costs.py:112
↓ 1 callers
Function
demoAccountApi
()
scripts/sdk_workspace_and_account.py:19
↓ 1 callers
Function
demoWorkspaceApi
()
scripts/sdk_workspace_and_account.py:6
↓ 1 callers
Function
display_job_costs
(data_array)
scripts/sdk_analyze_job_costs.py:107
↓ 1 callers
Function
display_summary
(data_array)
scripts/sdk_analyze_job_costs.py:122
↓ 1 callers
Function
fallback_analysis
Fallback method using Jobs API when system tables are unavailable. Note: This doesn't provide cost data, only run information.
scripts/sdk_analyze_job_costs.py:138
↓ 1 callers
Method
get_test_output
(self)
src/template/config.py:131
↓ 1 callers
Function
get_todays_date
Get today's date in YYYY-MM-DD format.
scripts/sdk_analyze_job_costs.py:23
↓ 1 callers
Function
get_warehouse_id
Get the first available SQL warehouse ID.
scripts/sdk_analyze_job_costs.py:99
↓ 1 callers
Function
main
()
src/template/main.py:47
↓ 1 callers
Function
main
()
scripts/sdk_init_workspace.py:104
↓ 1 callers
Function
main
Main entry point for the script.
scripts/sdk_analyze_job_costs.py:183
↓ 1 callers
Function
main
()
scripts/sdk_generate_template_job.py:474
↓ 1 callers
Function
main
()
scripts/project_costs.py:196
↓ 1 callers
Function
main
()
scripts/sdk_drop_tables.py:46
Method
__init__
(self, run_id: str)
src/template/config.py:24
Method
__init__
(self, config)
src/template/baseTask.py:5
Method
__init__
(self, config)
src/template/job1/generate_orders_agg.py:7
Method
__init__
(self, config)
src/template/job1/generate_orders.py:7
Method
__init__
(self, config)
src/template/job1/extract_source2.py:13
Method
__init__
(self, config)
src/template/job1/extract_source1.py:14
Method
__init__
(self, config)
src/template/job1/health_check.py:8
Method
__init__
(self, config)
tests/job1/integration_setup.py:12
Method
__init__
(self, config)
tests/job1/integration_validate.py:11
Function
config
()
tests/job1/unit_test.py:35
Function
curated_order_enriched_sdp
()
src/template/job1_sdp/pipeline.py:144
Function
df_orders
(spark)
tests/job1/unit_test.py:65
Function
df_orders_enriched
Pre-joined enriched orders matching the output of enrich_order().
tests/job1/unit_test_sdp.py:39
Function
df_orders_from_source
(spark)
tests/job1/unit_test.py:53
Function
raw_customer_sdp
()
src/template/job1_sdp/pipeline.py:92
Function
raw_order_item_sdp
()
src/template/job1_sdp/pipeline.py:131
Function
raw_order_sdp
()
src/template/job1_sdp/pipeline.py:118
Function
raw_product_sdp
()
src/template/job1_sdp/pipeline.py:105
Function
report_order_agg_sdp
()
src/template/job1_sdp/pipeline.py:162
Method
run
(self)
src/template/job1/generate_orders_agg.py:27
Method
run
(self)
src/template/job1/generate_orders.py:37
Method
run
(self)
src/template/job1/extract_source2.py:44
Method
run
(self)
src/template/job1/extract_source1.py:17
Method
run
(self)
src/template/job1/health_check.py:11
Method
run
(self)
tests/job1/integration_setup.py:90
Method
run
(self)
tests/job1/integration_validate.py:49
Function
spark
()
tests/job1/unit_test_sdp.py:34
Function
spark
(config)
tests/job1/unit_test.py:48
Function
test_aggregate_orders
(spark, config, df_orders)
tests/job1/unit_test.py:222
Function
test_aggregate_orders_row_count
One aggregated row per distinct customer name.
tests/job1/unit_test_sdp.py:153
Function
test_aggregate_orders_values
Aggregated qty and value must match hand-calculated totals.
tests/job1/unit_test_sdp.py:159
next →
1–100 of 113, ranked by callers