Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redshift equivalent of TEXT data type

Tags:

What's the best data type to use for a column in a redshift table that will hold a very long string (can be up to 50KB)?

TEXT is replaced by varchar(256) by default. For now I used varchar(65535), but I'm not sure if that's the right way to do that...

Thanks

like image 396
WeaselFox Avatar asked Jun 18 '15 15:06

WeaselFox


People also ask

What is the real data type in the Redshift?

Amazon Redshift Numeric supports three kinds of Integer data types, SMALLINT, INT, and BIGINT.

Does Redshift support unstructured data?

Unstructured data – Data in Amazon Redshift must be structured by a defined schema, rather than supporting arbitrary schema structure for each row. If your data is unstructured, you can perform extract, transform, and load (ETL) on Amazon EMR to get the data ready for loading into Amazon Redshift.

What is varchar SQL?

VARCHAR(size) A VARIABLE length string (can contain letters, numbers, and special characters). The size parameter specifies the maximum string length in characters - can be from 0 to 65535. BINARY(size) Equal to CHAR(), but stores binary byte strings.


1 Answers

Text Data Type in Redshift:

For Redshift Text Data Type you can use varchar(max) or varchar(65535)

That is the maximum length of a text data type field in Redshift.

like image 136
Tech Support Avatar answered Sep 17 '22 10:09

Tech Support