在Databricks中,将SQL表读取为
val TransformationRules = spark.read.jdbc(jdbcUrl, "ADF.TransformationRules", connectionProperties)
.select("RuleCode","SourceSystem","PrimaryTable", "PrimaryColumn", "SecondaryColumn", "NewColumnName","CurrentFlag")
.where("SourceSystem = 'QWDS' AND RuleCode = 'STD00003' ")
如何在SourceSystem
子句中参数化RuleCode
和Where
指:https://docs.microsoft.com/en-us/azure/databricks/data/data-sources/sql-databases
据我所知,您想在where子句字符串中插入值?也许下面的解决方案可以为您工作: