Repository: flink Updated Branches: refs/heads/release-1.3 d0e417e51 -> aa57442d6
[hotfix] Update DataSet docs concerning JDBCInputFormat. The way to provide type information was outdated. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/aa57442d Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/aa57442d Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/aa57442d Branch: refs/heads/release-1.3 Commit: aa57442d67a3536068908a9fa04e1dfd1e58dce5 Parents: d0e417e Author: Maximilian Bode <maximilian.b...@tngtech.com> Authored: Wed May 31 18:48:51 2017 +0200 Committer: zentol <ches...@apache.org> Committed: Thu Jun 1 20:39:22 2017 +0200 ---------------------------------------------------------------------- docs/dev/batch/index.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/aa57442d/docs/dev/batch/index.md ---------------------------------------------------------------------- diff --git a/docs/dev/batch/index.md b/docs/dev/batch/index.md index 6fccc04..9a8ce22 100644 --- a/docs/dev/batch/index.md +++ b/docs/dev/batch/index.md @@ -890,14 +890,12 @@ DataSet<Long> numbers = env.generateSequence(1, 10000000); // Read data from a relational database using the JDBC input format DataSet<Tuple2<String, Integer> dbData = env.createInput( - // create and configure input format JDBCInputFormat.buildJDBCInputFormat() .setDrivername("org.apache.derby.jdbc.EmbeddedDriver") .setDBUrl("jdbc:derby:memory:persons") .setQuery("select name, age from persons") - .finish(), - // specify type information for DataSet - new TupleTypeInfo(Tuple2.class, STRING_TYPE_INFO, INT_TYPE_INFO) + .setRowTypeInfo(new RowTypeInfo(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO)) + .finish() ); // Note: Flink's program compiler needs to infer the data types of the data items which are returned