title: Redshift: 500310 Invalid Operation
body: <p>I am using talend to insert data into a table on Amazon Redshift. The java code is producing by talend but <code>today()</code> function is not supported by Amazon Redshift. </p>
  
  <p>I am trying to load a table from Salesforce and put it in Redshift using talend. When I am running the job from talend I have following error:</p>
  
  <pre><code>Exception in component tRedshiftOutput_1
  java.sql.SQLException: [Amazon](500310) Invalid operation: function today() does not exist;
      at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(ErrorResponse.java:1830)
      at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(PGMessagingContext.java:804)
      at com.amazon.redshift.client.PGMessagingContext.handleMessage(PGMessagingContext.java:642)
      at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(InboundMessagesPipeline.java:312)
      at com.amazon.redshift.client.PGMessagingContext.doMoveToNextClass(PGMessagingContext.java:1062)
      at com.amazon.redshift.client.PGMessagingContext.getErrorResponse(PGMessagingContext.java:1030)
      at com.amazon.redshift.client.PGClient.handleErrorsScenario3(PGClient.java:2481)
      at com.amazon.redshift.client.PGClient.handleErrors(PGClient.java:2346)
      at com.amazon.redshift.client.PGClient.directExecute(PGClient.java:1098)
      at com.amazon.redshift.client.PGClient.directExecuteExtraMetadata(PGClient.java:1167)
  [FATAL]: dw.create_invoice_0_1.create_invoice - tRedshiftOutput_1 [Amazon](500310) Invalid operation: function today() does not exist;
      at com.amazon.redshift.dataengine.PGQueryExecutor.execute(PGQueryExecutor.java:210)
      at com.amazon.jdbc.common.SStatement.executeNoParams(Unknown Source)
      at com.amazon.jdbc.common.SStatement.execute(Unknown Source)
      at dw.create_invoice_0_1.create_invoice.tSalesforceInput_1Process(create_invoice.java:4691)
      at dw.create_invoice_0_1.create_invoice.tSalesforceConnection_1Process(create_invoice.java:694)
      at dw.create_invoice_0_1.create_invoice.runJobInTOS(create_invoice.java:8761)
  Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: function today() does not exist
  </code></pre>
  
  <p>It seems that Amazon Redshift does not support <code>today()</code> function.</p>
  
  <p>I  want to know how can I deal with that problem?</p>