I have created dataframe using pyspark and trying to query based on dynamic variable, its giving empty rows.Can any help me to how pass dynamic variable in below query ?
start_dt = '2022-1-15'
df.printSchema()
-- state
--- county
--- population
---- pdate --- string
df = df.filter((df.state == 'CA') & (df.pdate == start_dt))
df.show()