java.sql.SQLException: [Amazon](500310) Invalid operation: syntax error at or near "create";

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • CREATE statement
    via GitHub by chanansh
    ,
  • S3 Bucket does not exist error
    via GitHub by ghost
    ,
    • java.sql.SQLException: [Amazon](500310) Invalid operation: syntax error at or near "create"; at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(ErrorResponse.java:1830) at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(PGMessagingContext.java:822) at com.amazon.redshift.client.PGMessagingContext.handleMessage(PGMessagingContext.java:647) at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(InboundMessagesPipeline.java:312) at com.amazon.redshift.client.PGMessagingContext.doMoveToNextClass(PGMessagingContext.java:1080) at com.amazon.redshift.client.PGMessagingContext.getParameterDescription(PGMessagingContext.java:996) at com.amazon.redshift.client.PGClient.prepareStatement(PGClient.java:1857) at com.amazon.redshift.dataengine.PGBatchQueryExecutor.<init>(PGBatchQueryExecutor.java:135) at com.amazon.redshift.dataengine.PGDataEngine.prepare(PGDataEngine.java:228) at com.amazon.jdbc.common.SPreparedStatement.<init>(Unknown Source) at com.amazon.jdbc.jdbc4.S4PreparedStatement.<init>(Unknown Source) at com.amazon.redshift.core.jdbc4.PGJDBC4PreparedStatement.<init>(PGJDBC4PreparedStatement.java:49) at com.amazon.redshift.core.jdbc4.PGJDBC4ObjectFactory.createPreparedStatement(PGJDBC4ObjectFactory.java:119) at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source) at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source) at com.databricks.spark.redshift.JDBCWrapper.resolveTable(RedshiftJDBCWrapper.scala:168) at com.databricks.spark.redshift.RedshiftRelation$$anonfun$schema$1.apply(RedshiftRelation.scala:65) at com.databricks.spark.redshift.RedshiftRelation$$anonfun$schema$1.apply(RedshiftRelation.scala:60) at scala.Option.getOrElse(Option.scala:120) at com.databricks.spark.redshift.RedshiftRelation.schema$lzycompute(RedshiftRelation.scala:60) at com.databricks.spark.redshift.RedshiftRelation.schema(RedshiftRelation.scala:59) at org.apache.spark.sql.execution.datasources.LogicalRelation.<init>(LogicalRelation.scala:37) at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:125) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:231) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:381) at py4j.Gateway.invoke(Gateway.java:259) at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133) at py4j.commands.CallCommand.execute(CallCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:209) Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: syntax error at or near "create"; ... 33 more

    Users with the same issue

    aldrinleal
    aldrinleal2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,