How to install python libraries in DLT using databricks asset bundles

nkrom456
New Contributor III

Hi Team,

Is there any way we can install python packages to DLT using Databricks asset bundles.

 

 

resources:
pipelines:
xysz:
name: xyx
configuration:
input_file: test.json
env: ${var}
permissions:
- group_name: ${var}
level: CAN_MANAGE
- group_name: ${var}
level: CAN_MANAGE
- group_name: ${var}
level: CAN_MANAGE
clusters:
- label: default
custom_tags:
Project: ${var}

autoscale:
min_workers: 1
max_workers: 8
mode: ENHANCED

libraries:
- pypi:
package: databricks-sdk

libraries:
- notebook:
path: path of notebook
schema: gold
tags:
Project: ${var}
development: ${var}
catalog: ${var.}

Thanks and Regards

SP_6721
Honored Contributor II

Hi @nkrom456 ,

Add a %pip install command at the top of your DLT pipeline notebook to install the required packages. This will ensure the packages are available on all nodes during pipeline execution.