You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spark version = 2.2
spark-shell --jars salesforce-jdbc-1.1-20180403.104727-1-single.jar
val jdbcurl="jdbc:ascendix:salesforce://;user=;password=;loginDomain="
val df=spark.read.format("jdbc").option("driver","com.ascendix.jdbc.salesforce.ForceDriver").option("url",jdbcurl).option("dbtable","select Name from account limit 10").load()
Error: ( I dont have an asterix in my soql )
java.sql.SQLException: org.mule.tools.soql.exception.SOQLParsingException: There was a SOQL parsing error close to '' (line:1,position:7).
at com.ascendix.jdbc.salesforce.ForcePreparedStatement.query(ForcePreparedStatement.java:123)
at com.ascendix.jdbc.salesforce.ForcePreparedStatement.executeQuery(ForcePreparedStatement.java:99)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.resolveTable(JDBCRDD.scala:62)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation.(JDBCRelation.scala:114)
at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:52)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:309)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:178)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:146)
at org.apache.spark.sql.DataFrameReader.jdbc(DataFrameReader.scala:193)
... 50 elided
Caused by: org.mule.tools.soql.exception.SOQLParsingException: There was a SOQL parsing error close to '' (line:1,position:7).
at org.mule.tools.soql.SOQLParserHelper.createParsingRecognitionException(SOQLParserHelper.java:115)
at org.mule.tools.soql.SOQLParserHelper.createParsingException(SOQLParserHelper.java:90)
at org.mule.tools.soql.SOQLParserHelper.createSOQLParserTree(SOQLParserHelper.java:71)
at org.mule.tools.soql.SOQLParserHelper.createSOQLData(SOQLParserHelper.java:34)
at com.ascendix.jdbc.salesforce.SoqlQueryAnalyzer.getQueryData(SoqlQueryAnalyzer.java:191)
at com.ascendix.jdbc.salesforce.SoqlQueryAnalyzer.getFieldDefinitions(SoqlQueryAnalyzer.java:162)
at com.ascendix.jdbc.salesforce.ForcePreparedStatement.getFieldDefinitions(ForcePreparedStatement.java:264)
at com.ascendix.jdbc.salesforce.ForcePreparedStatement.query(ForcePreparedStatement.java:113)
... 58 more
Caused by: org.antlr.runtime.NoViableAltException
at org.mule.tools.soql.parser.SOQLParser.select_spec(SOQLParser.java:4853)
at org.mule.tools.soql.parser.SOQLParser.select_clause(SOQLParser.java:2961)
at org.mule.tools.soql.parser.SOQLParser.soql_query_(SOQLParser.java:2680)
at org.mule.tools.soql.parser.SOQLParser.soql_query(SOQLParser.java:2587)
at org.mule.tools.soql.SOQLParserHelper.createSOQLParserTree(SOQLParserHelper.java:56)
... 63 more
The text was updated successfully, but these errors were encountered:
I figured out why this happens, spark puts in quotes in your fields when it tries to select. I went to the SoqlQueryAnalyzer file and did a soql.replace(""", "") and it did the trick.
Spark version = 2.2
spark-shell --jars salesforce-jdbc-1.1-20180403.104727-1-single.jar
val jdbcurl="jdbc:ascendix:salesforce://;user=;password=;loginDomain="
val df=spark.read.format("jdbc").option("driver","com.ascendix.jdbc.salesforce.ForceDriver").option("url",jdbcurl).option("dbtable","select Name from account limit 10").load()
Error: ( I dont have an asterix in my soql )
java.sql.SQLException: org.mule.tools.soql.exception.SOQLParsingException: There was a SOQL parsing error close to '' (line:1,position:7).
at com.ascendix.jdbc.salesforce.ForcePreparedStatement.query(ForcePreparedStatement.java:123)
at com.ascendix.jdbc.salesforce.ForcePreparedStatement.executeQuery(ForcePreparedStatement.java:99)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.resolveTable(JDBCRDD.scala:62)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation.(JDBCRelation.scala:114)
at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:52)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:309)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:178)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:146)
at org.apache.spark.sql.DataFrameReader.jdbc(DataFrameReader.scala:193)
... 50 elided
Caused by: org.mule.tools.soql.exception.SOQLParsingException: There was a SOQL parsing error close to '' (line:1,position:7).
at org.mule.tools.soql.SOQLParserHelper.createParsingRecognitionException(SOQLParserHelper.java:115)
at org.mule.tools.soql.SOQLParserHelper.createParsingException(SOQLParserHelper.java:90)
at org.mule.tools.soql.SOQLParserHelper.createSOQLParserTree(SOQLParserHelper.java:71)
at org.mule.tools.soql.SOQLParserHelper.createSOQLData(SOQLParserHelper.java:34)
at com.ascendix.jdbc.salesforce.SoqlQueryAnalyzer.getQueryData(SoqlQueryAnalyzer.java:191)
at com.ascendix.jdbc.salesforce.SoqlQueryAnalyzer.getFieldDefinitions(SoqlQueryAnalyzer.java:162)
at com.ascendix.jdbc.salesforce.ForcePreparedStatement.getFieldDefinitions(ForcePreparedStatement.java:264)
at com.ascendix.jdbc.salesforce.ForcePreparedStatement.query(ForcePreparedStatement.java:113)
... 58 more
Caused by: org.antlr.runtime.NoViableAltException
at org.mule.tools.soql.parser.SOQLParser.select_spec(SOQLParser.java:4853)
at org.mule.tools.soql.parser.SOQLParser.select_clause(SOQLParser.java:2961)
at org.mule.tools.soql.parser.SOQLParser.soql_query_(SOQLParser.java:2680)
at org.mule.tools.soql.parser.SOQLParser.soql_query(SOQLParser.java:2587)
at org.mule.tools.soql.SOQLParserHelper.createSOQLParserTree(SOQLParserHelper.java:56)
... 63 more
The text was updated successfully, but these errors were encountered: