我试图在Azure Data Bricks Notebook中使用交叉应用,但在SQL Server中相同查询正常工作时会抛出错误的语法,即接近Apply的错误.Azure Data Bricks Notebook不支持Apply运算符吗?
enter ## Connection parameters ##
sqlserver = 'servername'
port = '1433'
database = 'dbname'
user = 'username'
pswd = "pwd"
query = "(select * from repair_detail a\
cross apply (select top 1 * from order c where a.RO_NO=c.RO_NO) b\
) AS CustSales"
## Load Data Frame ##
df1 = spark.read \
.option('user', user) \
.option('password', pswd) \
.jdbc('jdbc:sqlserver://' + sqlserver + ':' + port + ';database=' +database,
query)
# Show the resulting DataFrame
df1.show()