I am trying to write into a reference table.
I am using spark-connector 2.0.2
The spark code is trying t write a dataframe using something like this:
df.write.format(“com.memsql.spark.connector”).mode(“overwrite”).save(target_reference_memsql_table)
But, it throws this error:
ERROR Client: Application diagnostics message: User class threw exception: com.memsql.spark.SaveToMemSQLException: SaveToMemSQLException: org.apache.spark.SparkException: Job aborted due to stage failure: Task 22 in stage 2.0 failed 4 times, most recent failure: Lost task 22.3 in stage 2.0 (TID 79, <ip>, executor 10): java.sql.SQLException: This instance is not the master aggregator. Modifying a reference table is not permitted on child aggregators and leaves.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1618)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1549)