@@ -45,18 +45,18 @@ See how to link with it for cluster execution [here]({{< ref "docs/dev/configura
45
45
46
46
A driver dependency is also required to connect to a specified database. Here are drivers currently supported:
47
47
48
- | Driver | Group Id | Artifact Id | JAR |
49
- | :-----------| :---------------------------| :-----------------------| :----------------------------------------------------------------------------------------------------------------------------------|
50
- | MySQL | ` mysql ` | ` mysql-connector-java ` | [ Download] ( https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/ ) |
51
- | Oracle | ` com.oracle.database.jdbc ` | ` ojdbc8 ` | [ Download] ( https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8 ) |
52
- | PostgreSQL | ` org.postgresql ` | ` postgresql ` | [ Download] ( https://jdbc.postgresql.org/download/ ) |
53
- | Derby | ` org.apache.derby ` | ` derby ` | [ Download] ( http://db.apache.org/derby/derby_downloads.html ) |
54
- | SQL Server | ` com.microsoft.sqlserver ` | ` mssql-jdbc ` | [ Download] ( https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-ver16 ) |
55
- | CrateDB | ` io.crate ` | ` crate-jdbc ` | [ Download] ( https://repo1.maven.org/maven2/io/crate/crate-jdbc/ ) |
56
- | Db2 | ` com.ibm.db2.jcc ` | ` db2jcc ` | [ Download] ( https://www.ibm.com/support/pages/download-db2-fix-packs-version-db2-linux-unix-and-windows ) |
57
- | Trino | ` io.trino ` | ` trino-jdbc ` | [ Download] ( https://repo1.maven.org/maven2/io/trino/trino-jdbc/ ) |
58
- | OceanBase | ` com.oceanbase ` | ` oceanbase-client ` | [ Download] ( https://repo1.maven.org/maven2/com/oceanbase/oceanbase-client/ ) |
59
-
48
+ | Driver | Group Id | Artifact Id | JAR |
49
+ | :-------------- | :---------------------------| :-----------------------| :----------------------------------------------------------------------------------------------------------------------------------|
50
+ | MySQL | ` mysql ` | ` mysql-connector-java ` | [ Download] ( https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/ ) |
51
+ | Oracle | ` com.oracle.database.jdbc ` | ` ojdbc8 ` | [ Download] ( https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8 ) |
52
+ | PostgreSQL | ` org.postgresql ` | ` postgresql ` | [ Download] ( https://jdbc.postgresql.org/download/ ) |
53
+ | Derby | ` org.apache.derby ` | ` derby ` | [ Download] ( http://db.apache.org/derby/derby_downloads.html ) |
54
+ | SQL Server | ` com.microsoft.sqlserver ` | ` mssql-jdbc ` | [ Download] ( https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-ver16 ) |
55
+ | CrateDB | ` io.crate ` | ` crate-jdbc ` | [ Download] ( https://repo1.maven.org/maven2/io/crate/crate-jdbc/ ) |
56
+ | Db2 | ` com.ibm.db2.jcc ` | ` db2jcc ` | [ Download] ( https://www.ibm.com/support/pages/download-db2-fix-packs-version-db2-linux-unix-and-windows ) |
57
+ | Trino | ` io.trino ` | ` trino-jdbc ` | [ Download] ( https://repo1.maven.org/maven2/io/trino/trino-jdbc/ ) |
58
+ | OceanBase | ` com.oceanbase ` | ` oceanbase-client ` | [ Download] ( https://repo1.maven.org/maven2/com/oceanbase/oceanbase-client/ ) |
59
+ | Elasticsearch | ` org.elasticsearch.plugin ` | ` x-pack-sql-jdbc ` | [ Download ] ( https://www.elastic.co/downloads/jdbc-client ) |
60
60
61
61
JDBC connector and drivers are not part of Flink's binary distribution. See how to link with them for cluster execution [ here] ({{< ref "docs/dev/configuration/overview" >}}).
62
62
@@ -656,7 +656,7 @@ SELECT * FROM `custom_schema.test_table2`;
656
656
657
657
Data Type Mapping
658
658
----------------
659
- Flink supports connect to several databases which uses dialect like MySQL, Oracle, PostgreSQL, CrateDB, Derby, SQL Server, Db2 and OceanBase. The Derby dialect usually used for testing purpose. The field data type mappings from relational databases data types to Flink SQL data types are listed in the following table, the mapping table can help define JDBC table in Flink easily.
659
+ Flink supports connect to several databases which uses dialect like MySQL, Oracle, PostgreSQL, CrateDB, Derby, SQL Server, Db2, OceanBase, Elasticsearch . The Derby dialect usually used for testing purpose. The field data type mappings from relational databases data types to Flink SQL data types are listed in the following table, the mapping table can help define JDBC table in Flink easily.
660
660
661
661
<table class =" table table-bordered " >
662
662
<thead>
@@ -670,6 +670,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
670
670
<th class="text-left"><a href="https://trino.io/docs/current/language/types.html">Trino type</a></th>
671
671
<th class="text-left"><a href="https://en.oceanbase.com/docs/common-oceanbase-database-10000000001106898">OceanBase MySQL mode type</a></th>
672
672
<th class="text-left"><a href="https://en.oceanbase.com/docs/common-oceanbase-database-10000000001107076">OceanBase Oracle mode type</a></th>
673
+ <th class="text-left"><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-data-types.html">Elastic SQL type</a></th>
673
674
<th class="text-left"><a href="{{< ref "docs/dev/table/types" >}}">Flink SQL type</a></th>
674
675
</tr>
675
676
</thead>
@@ -684,6 +685,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
684
685
<td><code>TINYINT</code></td>
685
686
<td><code>TINYINT</code></td>
686
687
<td></td>
688
+ <td><code>BYTE</code></td>
687
689
<td><code>TINYINT</code></td>
688
690
</tr>
689
691
<tr>
@@ -706,6 +708,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
706
708
<code>SMALLINT</code><br>
707
709
<code>TINYINT UNSIGNED</code></td>
708
710
<td></td>
711
+ <td><code>SHORT</code></td>
709
712
<td><code>SMALLINT</code></td>
710
713
</tr>
711
714
<tr>
@@ -728,6 +731,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
728
731
<code>MEDIUMINT</code><br>
729
732
<code>SMALLINT UNSIGNED</code></td>
730
733
<td></td>
734
+ <td><code>INTEGER</code></td>
731
735
<td><code>INT</code></td>
732
736
</tr>
733
737
<tr>
@@ -748,6 +752,9 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
748
752
<code>BIGINT</code><br>
749
753
<code>INT UNSIGNED</code></td>
750
754
<td></td>
755
+ <td>
756
+ <code>LONG</code><br>
757
+ <code>UNSIGNED_LONG</code></td>
751
758
<td><code>BIGINT</code></td>
752
759
</tr>
753
760
<tr >
@@ -760,6 +767,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
760
767
<td></td>
761
768
<td><code>BIGINT UNSIGNED</code></td>
762
769
<td></td>
770
+ <td></td>
763
771
<td><code>DECIMAL(20, 0)</code></td>
764
772
</tr>
765
773
<tr>
@@ -778,6 +786,9 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
778
786
<td><code>FLOAT</code></td>
779
787
<td>
780
788
<code>BINARY_FLOAT</code></td>
789
+ <td>
790
+ <code>FLOAT</code><br>
791
+ <code>HALF_FLOAT</code></td>
781
792
<td><code>FLOAT</code></td>
782
793
</tr>
783
794
<tr>
@@ -796,6 +807,9 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
796
807
<td><code>DOUBLE</code></td>
797
808
<td><code>DOUBLE</code></td>
798
809
<td><code>BINARY_DOUBLE</code></td>
810
+ <td>
811
+ <code>DOUBLE</code><br>
812
+ <code>SCALED_FLOAT</code></td>
799
813
<td><code>DOUBLE</code></td>
800
814
</tr>
801
815
<tr>
@@ -824,6 +838,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
824
838
<td>
825
839
<code>FLOAT(s)</code><br>
826
840
<code>NUMBER(p, s)</code></td>
841
+ <td></td>
827
842
<td><code>DECIMAL(p, s)</code></td>
828
843
</tr>
829
844
<tr>
@@ -841,6 +856,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
841
856
<code>TINYINT(1)</code></td>
842
857
<td></td>
843
858
<td><code>BOOLEAN</code></td>
859
+ <td><code>BOOLEAN</code></td>
844
860
</tr>
845
861
<tr>
846
862
<td><code>DATE</code></td>
@@ -852,6 +868,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
852
868
<td><code>DATE</code></td>
853
869
<td><code>DATE</code></td>
854
870
<td><code>DATE</code></td>
871
+ <td></td>
855
872
<td><code>DATE</code></td>
856
873
</tr>
857
874
<tr>
@@ -864,6 +881,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
864
881
<td><code>TIME_WITHOUT_TIME_ZONE</code></td>
865
882
<td><code>TIME [(p)]</code></td>
866
883
<td><code>DATE</code></td>
884
+ <td></td>
867
885
<td><code>TIME [(p)] [WITHOUT TIMEZONE]</code></td>
868
886
</tr>
869
887
<tr>
@@ -879,6 +897,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
879
897
<td><code>TIMESTAMP_WITHOUT_TIME_ZONE</code></td>
880
898
<td><code>DATETIME [(p)]</code></td>
881
899
<td><code>TIMESTAMP [(p)] [WITHOUT TIMEZONE]</code></td>
900
+ <td><code>DATETIME</code></td>
882
901
<td><code>TIMESTAMP [(p)] [WITHOUT TIMEZONE]</code></td>
883
902
</tr>
884
903
<tr>
@@ -927,6 +946,11 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
927
946
<code>NCHAR(n)</code><br>
928
947
<code>VARCHAR2(n)</code><br>
929
948
<code>CLOB</code></td>
949
+ <td>
950
+ <code>KEYWORD</code><br>
951
+ <code>IP</code><br>
952
+ <code>TEXT</code><br>
953
+ <code>VERSION</code></td>
930
954
<td><code>STRING</code></td>
931
955
</tr>
932
956
<tr>
@@ -952,6 +976,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
952
976
<td>
953
977
<code>RAW(s)</code><br>
954
978
<code>BLOB</code></td>
979
+ <td><code>BINARY</code></td>
955
980
<td><code>BYTES</code></td>
956
981
</tr>
957
982
<tr>
@@ -964,6 +989,7 @@ Flink supports connect to several databases which uses dialect like MySQL, Oracl
964
989
<td><code>ARRAY</code></td>
965
990
<td></td>
966
991
<td></td>
992
+ <td></td>
967
993
<td><code>ARRAY</code></td>
968
994
</tr>
969
995
</tbody>
0 commit comments