cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new field to Delta live Table

Madalian
New Contributor III

Hi Experts,

I have on Bronze layer all delta merge files (Parquet) format.

I am converting these files into delta live tables in silver layer. While doing so, I am unable to add current time stamp column.

Following is the script:

from pyspark.sql.functions import *
from pyspark.sql.types import *
import dlt
currentdate= spark.sql("select string(current_timestamp)").collect()[0][0]
@Dlt.table
def t_stream_silver_00_XXXX():
return (
spark.readStream
.format("delta")
.option("cloudFiles.format", "parquet")
.option(key = "SILVER_LOADING_TIME", value =currentdate)
.load("abfss://bronze-prod-XXXXX@adlsg2SAPPPPpsi001.dfs.core.windows.net/PROD/XXXX/Delta/00_XXXX/")
)

it didt not throw any error at the same time no column being added. Can you please help?

0 REPLIES 0

Connect with Databricks Users in Your Area

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