title: Unable to infer schema when connecting to Redshift from Spark
body: <p>I have installed sparc to <code>/opt/spark-2.2.0-bin-hadoop2.7/</code> and run python shell using</p>
  
  <pre><code>pyspark --jars spark-redshift_2.10-3.0.0-preview1.jar,RedshiftJDBC42-1.2.7.1003.jar,hadoop-aws-2.7.1.jar,aws-java-sdk-1.7.4.jar
  </code></pre>
  
  <p>from it's folder.</p>
  
  <p>Then I am trying to read from there using following commands in shell:</p>
  
  <pre><code>JDBC='jdbc:redshift://blablabla.regionblabla.redshift.amazonaws.com:5439/blabla?user=username&amp;password=password'
  
  from pyspark.sql import SQLContext
  sql_context = SQLContext(sc)
  
  df = sql_context.read \
      .option("url", JDBC) \
      .option("dbtable", "table_name") \
      .option("tempdir", "bucket") \
      .load()
  </code></pre>
  
  <p>And I get following traceback: </p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 4, in &lt;module&gt;
    File "/opt/spark-2.2.0-bin-hadoop2.7/python/pyspark/sql/readwriter.py", line 165, in load
      return self._df(self._jreader.load())
    File "/opt/spark-2.2.0-bin-hadoop2.7/python/lib/py4j-0.10.4-src.zip/py4j/java_gateway.py", line 1133, in __call__
    File "/opt/spark-2.2.0-bin-hadoop2.7/python/pyspark/sql/utils.py", line 69, in deco
      raise AnalysisException(s.split(': ', 1)[1], stackTrace)
  pyspark.sql.utils.AnalysisException: u'Unable to infer schema for Parquet. It must be specified manually.;'
  </code></pre>
  
  <p>After some search I found some issues and answers that state that this could be because there are no data there. But requests show me that table is not empty. So, I guess I have some problems with connection. How to fix this? Maybe I have wrong versions of spark or that jars, or some jar missing?</p>