Skip to content

Commit 4ce16f0

Browse files
committed
docs(datatype): supported Amazon Redshift datatypes and Python datatype counterpart
1 parent f6e99ba commit 4ce16f0

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,53 @@ Connection Parameters
287287
| role_arn | str | The Amazon Resource Name (ARN) of the role that the caller is assuming. This parameter is used by JwtCredentialsProvider. For this provider, this is a mandatory parameter. | None | No |
288288
+-----------------------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------+
289289

290+
Supported Datatypes
291+
~~~~~~~~~~~~~~~~~~~
292+
``redshift_connector`` supports the following Amazon Redshift datatypes. ``redshift_connector`` will attempt to treat unsupported datatypes as strings.
293+
Incoming data from Amazon Redshift is treated as follows:
294+
295+
+--------------------------+-------------------+
296+
| Amazon Redshift Datatype | Python Datatype |
297+
+==========================+===================+
298+
| BOOLEAN | bool |
299+
+--------------------------+-------------------+
300+
| INT8 | int |
301+
+--------------------------+-------------------+
302+
| INT4 | int |
303+
+--------------------------+-------------------+
304+
| INT2 | int |
305+
+--------------------------+-------------------+
306+
| VARCHAR | str |
307+
+--------------------------+-------------------+
308+
| OID | int |
309+
+--------------------------+-------------------+
310+
| XID | int |
311+
+--------------------------+-------------------+
312+
| JSON | dict |
313+
+--------------------------+-------------------+
314+
| FLOAT4 | float |
315+
+--------------------------+-------------------+
316+
| FLOAT8 | float |
317+
+--------------------------+-------------------+
318+
| CHAR | str |
319+
+--------------------------+-------------------+
320+
| DATE | datetime.date |
321+
+--------------------------+-------------------+
322+
| TIME | datetime.time |
323+
+--------------------------+-------------------+
324+
| TIMETZ | datetime.time |
325+
+--------------------------+-------------------+
326+
| TIMESTAMP | datetime.datetime |
327+
+--------------------------+-------------------+
328+
| TIMESTAMPTZ | datetime.datetime |
329+
+--------------------------+-------------------+
330+
| NUMERIC | decimal.Decimal |
331+
+--------------------------+-------------------+
332+
| GEOMETRY | str |
333+
+--------------------------+-------------------+
334+
| SUPER | str |
335+
+--------------------------+-------------------+
336+
290337
Logging
291338
~~~~~~~~~~~~
292339
``redshift_connector`` uses logging for providing detailed error messages regarding IdP authentication. A do-nothing handler is enabled by default as to prevent logs from being output to ``sys.stderr``.

0 commit comments

Comments
 (0)