Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/18266#discussion_r138464925 --- Diff: examples/src/main/python/sql/datasource.py --- @@ -177,6 +177,16 @@ def jdbc_dataset_example(spark): .jdbc("jdbc:postgresql:dbserver", "schema.tablename", properties={"user": "username", "password": "password"}) + # Specifying dataframe column data types on read + jdbcDF3 = spark.read \ + .format("jdbc") \ + .option("url", "jdbc:postgresql:dbserver") \ + .option("dbtable", "schema.tablename") \ + .option("user", "username") \ + .option("password", "password") \ + .option("customDataFrameColumnTypes", "id DECIMAL(38, 0), name STRING") \ --- End diff -- Please rename this.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org