title: Kafka Connect sink to Redshift table not in public schema
body: <p>I am unable to make a Kafka Connect sink work for a table that is not in the public schema.</p>
  
  <p>I am using Kafka Connect to send records to a Redshift database via a sink operation using JdbcSinkConnector.</p>
  
  <p>I have created my destination table in Redshift, but it is not in the <code>public</code> schema. (<code>my_schema.test_table</code>. Note: <code>auto.create</code> &amp; <code>auto.evolve</code> are off in the connector configuration)</p>
  
  <p>When I attempt to specify the table's location in the connector config, like so...</p>
  
  <p><code>
      "table.name.format": "my_schema.test_table",
  </code></p>
  
  <p>...the sink connector's task encounters this error when it attempts to get itself going:</p>
  
  <p><strong>"Table my_schema.test_table is missing and auto-creation is disabled"</strong></p>
  
  <p>from
  <code>
  Caused by: org.apache.kafka.connect.errors.ConnectException: Table my_schema.test_table is missing and auto-creation is disabled
    at io.confluent.connect.jdbc.sink.DbStructure.create(DbStructure.java:86)
    at io.confluent.connect.jdbc.sink.DbStructure.createOrAmendIfNecessary(DbStructure.java:63)
    at io.confluent.connect.jdbc.sink.BufferedRecords.add(BufferedRecords.java:78)
    ...
  </code></p>
  
  <p>I have tried the following formats for supplying table name:</p>
  
  <ul>
  <li><code>my_schema.test_table</code></li>
  <li><code>dev.my_schema.test_table</code></li>
  <li><code>test_table</code> &lt;-- in this case I get past the existence check that stops the others, but then run into this error every time Kafka Connect attempts to write a row:
  
  <ul>
  <li>"org.apache.kafka.connect.errors.RetriableException: java.sql.SQLException: java.sql.SQLException: Amazon Invalid operation: relation "test_table" does not exist;"</li>
  <li>Likely because <code>test_table</code> is not in the public schema. : (</li>
  </ul></li>
  </ul>
  
  <p>And it <em>seems</em> like the code is attempting to parse this table name correctly, but unfortunately it doesn't log its results.</p>
  
  <p>This is my connection string: <code>"connection.url": "jdbc:redshift://xxx.xxx.xxx.xxx:5439/dev"</code></p>
  
  <p>I have mucked around with attempting so specify <code>currentSchema=my_schema</code> in the connection string... both for the <code>redshift</code> jdbc driver as well as <code>postgresql</code>. No luck.</p>
  
  <p>I'm using Kafka Connect version 1.1.0</p>
  
  <p>Redshift JDBC JAR: <code>RedshiftJDBC42-1.2.16.1027.jar</code></p>
  
  <p>I am able to get data flowing by putting the table in the <code>public</code> schema and specifying table name with no schema: <code>"table.name.format": "test_table"</code>.
  Unfortunately, that's not where we need the data to be.</p>
  
  <p>Any help much appreciated.</p>