File tree Expand file tree Collapse file tree 2 files changed +78
-6
lines changed
Expand file tree Collapse file tree 2 files changed +78
-6
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,42 @@ connections.
5858** SQL_MODE:** Override the default SQL_MODE session variable used by the server.
5959
6060
61+ Data Types Mapping
62+ ----------
63+
64+ | MySQL Data Type | CDAP Schema Data Type | Comment |
65+ | ------------------------------ | --------------------- | -------------------------------------------------- |
66+ | BIT | boolean | |
67+ | TINYINT | int | |
68+ | BOOL, BOOLEAN | boolean | |
69+ | SMALLINT | int | |
70+ | MEDIUMINT | double | |
71+ | INT,INTEGER | int | |
72+ | BIGINT | long | |
73+ | FLOAT | float | |
74+ | DOUBLE | double | |
75+ | DECIMAL | decimal | |
76+ | DATE | date | |
77+ | DATETIME | timestamp | |
78+ | TIMESTAMP | timestamp | |
79+ | TIME | time | |
80+ | YEAR | date | |
81+ | CHAR | string | |
82+ | VARCHAR | string | |
83+ | BINARY | bytes | |
84+ | VARBINARY | bytes | |
85+ | TINYBLOB | bytes | |
86+ | TINYTEXT | string | |
87+ | BLOB | bytes | |
88+ | TEXT | string | |
89+ | MEDIUMBLOB | bytes | |
90+ | MEDIUMTEXT | string | |
91+ | LONGBLOB | bytes | |
92+ | LONGTEXT | string | |
93+ | ENUM | string | |
94+ | SET | string | |
95+
96+
6197Example
6298-------
6399Suppose you want to write output records to "users" table of MySQL database named "prod" that is running on "localhost",
Original file line number Diff line number Diff line change @@ -74,6 +74,42 @@ connections.
7474** SQL_MODE:** Override the default SQL_MODE session variable used by the server.
7575
7676
77+ Data Types Mapping
78+ ----------
79+
80+ | MySQL Data Type | CDAP Schema Data Type | Comment |
81+ | ------------------------------ | --------------------- | -------------------------------------------------- |
82+ | BIT | boolean | |
83+ | TINYINT | int | |
84+ | BOOL, BOOLEAN | boolean | |
85+ | SMALLINT | int | |
86+ | MEDIUMINT | double | |
87+ | INT,INTEGER | int | |
88+ | BIGINT | long | |
89+ | FLOAT | float | |
90+ | DOUBLE | double | |
91+ | DECIMAL | decimal | |
92+ | DATE | date | |
93+ | DATETIME | timestamp | |
94+ | TIMESTAMP | timestamp | |
95+ | TIME | time | |
96+ | YEAR | date | |
97+ | CHAR | string | |
98+ | VARCHAR | string | |
99+ | BINARY | bytes | |
100+ | VARBINARY | bytes | |
101+ | TINYBLOB | bytes | |
102+ | TINYTEXT | string | |
103+ | BLOB | bytes | |
104+ | TEXT | string | |
105+ | MEDIUMBLOB | bytes | |
106+ | MEDIUMTEXT | string | |
107+ | LONGBLOB | bytes | |
108+ | LONGTEXT | string | |
109+ | ENUM | string | |
110+ | SET | string | |
111+
112+
77113Example
78114------
79115Suppose you want to read data from MySQL database named "prod" that is running on "localhost" port 3306,
@@ -96,9 +132,9 @@ Password: "root"
96132For example, if the 'id' column is a primary key of type int and the other columns are
97133non-nullable varchars, output records will have this schema:
98134
99- | field name | type |
100- | -------------- | ------------------- |
101- | id | int |
102- | name | string |
103- | email | string |
104- | phone | string |
135+ | field name | type |
136+ | -------------- | ------------------- |
137+ | id | int |
138+ | name | string |
139+ | email | string |
140+ | phone | string |
You can’t perform that action at this time.
0 commit comments