I am hoping if someone can help here. Below is part of script our developer used in Azure Synapse to read and create TempView from parquet file. It reads parquet file "Client" and create a TempView: aa_client:
aa_client = read_from_data_lake(aa_account_name, aa_file_system_name, aa_file_location + "Client", aa_file_format, aa_header, aa_infer_schema)
aa_client.createOrReplaceTempView("aa_client")
aa_client = aa_client.withColumn("client_group",when(aa_client.client_group=="UGR","UG"))
aa_client = aa_client.withColumn("last_update_timestamp",lit(None))
The first 2 lines of codes are working, but I was just wondering if I could also add the following:
- change value in column "client_group" on condition: if value is "UGR" change to "UG"
- change the datetime in "last_update_timestamp" to none I tried to do this using withColumn (last two line of codes) but they are not working at all. I am hoping if someone can help please?
Many Thanks Michelle