โ11-17-2022 03:12 AM
Hi ,
im trying to setup DLT pipeline ,its a basic pipeline for testing purpose im facing the issue while starting the pipeline , any help is appreciated
Code :
@dlt.table(name="dlt_bronze_cisco_hardware")
def dlt_cisco_networking_bronze_hardware():
return (
spark.readStream.format("cloudFiles")\
.option("cloudFiles.format", "json")\
.option("cloudFiles.schemaLocation","abfss://adt-calfit-adls@adtedfdatalake.dfs.core.windows.net/DLT_Schema")\
.load("abfss://adt-calfit-adls@adtedfdatalake.dfs.core.windows.net/Landing/DLT_Testing/Hardware/*/*/*/*.json")
)
โ11-17-2022 04:47 AM
HI @Arumugam Ramachandranโ ,
first though - did you chose PYTHON CELL for your code?
or maybe this post will help: https://community.databricks.com/s/question/0D58Y00009DD3LZSA1/python-code-not-working-in-dbr-104-lt...
โ11-17-2022 05:23 AM
Hi Pat , Yes i have selected Python as the script for the cell
โ11-17-2022 05:30 AM
Hi @Arumugam Ramachandranโ seems like you have a spark config set on your DLT job cluster that allows only python and SQL code. Check the spark config (cluster policy).
In any case, the python code should work. Verify the notebook's default language, it should not be scala.
Check this doc for additional details.
https://docs.databricks.com/notebooks/notebooks-manage.html#execution-contexts
Mark a comment as 'best answer' to resolve the query, thanks.
โ11-17-2022 06:40 AM
Hi vivian , the notebook has default as python , but still facing the issue
โ11-17-2022 07:04 AM
@Arumugam Ramachandranโ Please remove "spark.databricks.repl.allowedLanguages" config for the DLT clusters if you have it in the policy. DLT only works with python and SQL notebook anyways and we don't need to explicitly set this config.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group