我想我缺少了一些東西,但無法弄清楚。我想使用特定的sql語句使用SQLContext和JDBC加載數(shù)據(jù),例如select top 1000 text from table1 with (nolock)where threadid in ( select distinct id from table2 with (nolock) where flag=2 and date >= '1/1/2015' and userid in (1, 2, 3))我應(yīng)該使用哪種SQLContext方法?我看到的示例始終指定表名以及上下邊界。
Spark SQL-使用SQL語句而不是表名使用JDBC加載數(shù)據(jù)
幕布斯6054654
2019-11-04 10:56:15