

{"id":16465,"date":"2018-06-04T06:16:44","date_gmt":"2018-06-04T06:16:44","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=16465"},"modified":"2021-04-05T13:45:19","modified_gmt":"2021-04-05T08:15:19","slug":"cassandra-data-types","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/","title":{"rendered":"Cassandra Data Types | Built-in, Collection, User-defined"},"content":{"rendered":"<h2>1. Objective<\/h2>\n<p><span style=\"font-weight: 400\">In our previous <a href=\"https:\/\/data-flair.training\/blogs\/apache-cassandra-tutorial\/\"><strong>Cassandra<\/strong> <\/a>article, we went through the <a href=\"https:\/\/data-flair.training\/blogs\/cassandra-curd-operation\/\"><strong>CURD<\/strong>\u00a0<strong>operations in Cassandra<\/strong><\/a>. In this article, we will study the Cassandra Data Types. Moreover, in CQL data types we will see 3 different types of data types Built-in, collection, and user-defined data types.\u00a0\u00a0<\/span><\/p>\n<p>So, let&#8217;s begin Cassandra Data Types.<\/p>\n<div id=\"attachment_16481\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-16481\" class=\"wp-image-16481 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg\" alt=\"Cassandra Data Types\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-16481\" class=\"wp-caption-text\">Cassandra Data Types | Built-in, Collection, User-defined<\/p><\/div>\n<h2>2. What are the Cassandra Data Types?<\/h2>\n<p><span style=\"font-weight: 400\">Data Types usually signify the type of variables assigned in a program. We have studied many data types in other programming languages. For example int, char, float etc. In Cassandra query language, there are many data types. <\/span><\/p>\n<p><span style=\"font-weight: 400\">These Cassandra Data Types include built-in, collection and user-defined data types. The user can choose any of them as according the requirement of the program.<\/span><br \/>\n<a href=\"https:\/\/data-flair.training\/blogs\/cassandra-data-model\/\"><strong>Learn Cassandra Data Model | How Cassandra Stores Data<\/strong><\/a><\/p>\n<h2>3. Types of Cassandra Data Types<\/h2>\n<p>Following are the 3 Cassandra Data Types, let&#8217;s discuss them one by one:<\/p>\n<h3>a. Built-In Data Type<\/h3>\n<p><span style=\"font-weight: 400\">These Cassandra data types are basically pre-defined in Cassandra. The user can refer the variables to any of them. There are many built-in data types in Cassandra data types. Some of them are:<\/span><\/p>\n<div id=\"attachment_16482\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Built-In-Data-Type-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-16482\" class=\"wp-image-16482 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Built-In-Data-Type-01.jpg\" alt=\"Cassandra Data Types | Built-in, Collection, User-defined\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Built-In-Data-Type-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Built-In-Data-Type-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Built-In-Data-Type-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Built-In-Data-Type-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Built-In-Data-Type-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-16482\" class=\"wp-caption-text\">Cassandra Data Types- Built-in Data Types<\/p><\/div>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/cassandra-interview-questions\/\">Prepare yourself for Cassandra\u00a0Interview<\/a><\/strong><\/p>\n<p><strong>i. boolean<\/strong><br \/>\n<span style=\"font-weight: 400\">This Cassandra data type is used booleans. They represent two values, true or false. We use this for applications or variables involving just two values. <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><br \/>\n<strong>ii. blob<\/strong><br \/>\n<span style=\"font-weight: 400\">This Cassandra data type represents the arbitrary bytes. These arbitrary bytes include any kind of variable used to represent an arbitrary variable.<\/span><br \/>\n<a href=\"https:\/\/data-flair.training\/blogs\/cassandra-architecture\/\"><strong>Let&#8217;s discuss\u00a0Cassandra Architecture a Complete Guide<\/strong><\/a><\/p>\n<p><strong>iii. ascii<\/strong><br \/>\n<span style=\"font-weight: 400\">This Cassandra data type is used for strings i.e. words and sentences. This represents the ASCII character string. The ASCII is basically an identifier for different characters. We store the value of the variable as ASCII code of the value.<\/span><\/p>\n<p><strong>iv. bigint<\/strong><br \/>\n<span style=\"font-weight: 400\">This Cassandra data type is used for 64 bit signed long integer. This data type stores a higher range of integers as compared to int. In this data type 64 bit signed represents a value from -(2^32) to +2^32 roughly. <\/span><\/p>\n<p><strong>v. Counter<\/strong><br \/>\n<span style=\"font-weight: 400\">This Cassandra data type is used for integers. It represents a counter column. These columns are a part of the rows, which in turn are part of the column family. These contain numeric values, containing the number of columns.<\/span><\/p>\n<p><strong>vi. decimal<\/strong><br \/>\n<span style=\"font-weight: 400\">This data type is used for Example-integers. This is a basic data type used in approximately every language. <\/span><\/p>\n<p><strong>vii. double<\/strong><br \/>\n<span style=\"font-weight: 400\">It is used for integers. It represents a 64-bit floating point. These include a number with decimal points as well. Example 5.883, 94.2 etc.<\/span><br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/cassandra-applications\/\">Explore\u00a0Cassandra Applications<\/a><\/strong><\/p>\n<p><strong>viii. float<\/strong><br \/>\n<span style=\"font-weight: 400\">It is used for numbers. It represents a 32-bit floating point. This contains numbers in a lesser range than double. It represents values with a decimal point. Example 4.333, 45.23523 etc..<\/span><\/p>\n<p><strong>ix. inet<\/strong><br \/>\n<span style=\"font-weight: 400\">This is used to represent an IP address. The IP address of any system includes both numeric and characters. These numbers won&#8217;t require\u00a0in any arithmetic operation. Therefore, we treat them as a character. In other words, this data type is used for strings or characters.<\/span><\/p>\n<p><strong>x. int<\/strong><br \/>\n<span style=\"font-weight: 400\">They represent 32-bit signed integers. This is a low range version of big int. The signed integer represents numbers both negative and positive. The range of the number that int supports lie from -2^16 to 2^16 roughly.<\/span><\/p>\n<p><strong>xi. text<\/strong><br \/>\n<span style=\"font-weight: 400\">It is used for strings. It represents UTF8 encoded string. UTF 8 is a variable with character encoding. This basically encodes all the valid points in Uni-code using one to four 8-bit types.<\/span><br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/cassandra-shell-commands\/\">Let&#8217;s revise\u00a09 Cassandra Shell Commands \u2013 You Must Know<\/a><\/strong><\/p>\n<p><strong>xii. varchar<\/strong><br \/>\n<span style=\"font-weight: 400\">It is used for strings. It represents UTF8 encoded string. \u00a0This basically describes a variable or arbitrary character. It is used to satisfy the UTF 8 as discussed in the above data type<\/span><\/p>\n<p><strong>xiii. timestamp<\/strong><br \/>\n<span style=\"font-weight: 400\">It represents a timestamp. It consists of Cassandra collections of integers and strings both. This timestamp basically represents the time of creation. We can use a lot of formats for the timestamp. This format includes the date, year, month, time, and also the meridian position for some time.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">The formats are:<\/span><br \/>\n<strong>yyyy-mm-dd HH:mm<br \/>\nyyyy-mm-dd HH:mm:ss<\/strong><br \/>\n<span style=\"font-weight: 400\">Example: If the user wants time say, 15 February 1995, 02:15 AM at GMT. The timestamp would be: 1995-02-15 \u00a002:15+0000.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">All the meridian are represented as 4 digit number. For India, the number is +0530.<\/span><\/p>\n<p><strong>xiv. variant<\/strong><br \/>\n<span style=\"font-weight: 400\">It is used for integers. \u00a0It represents an arbitrary-precision integer.<\/span><br \/>\n<strong>Example-<\/strong><br \/>\n<span style=\"font-weight: 400\">After going through all the data types, we will go through an example covering all the data type. Let us make a table and illustrate the data types using this table.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/cassandra-terminologies\/\">Have a look at mostly used Cassandra Terminologies<\/a><\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">cqlsh:keyspace1&gt;CREATE TABLE datatypes(\r\ntype1 boolean,\r\ntype2 blob,\r\ntype3 ascii,\r\ntype4 bigint,\r\ntype5 counter,\r\ntype6 decimal,\r\ntype7 double,\r\ntype8 float,\r\ntype9 inet,\r\ntype10 int,\r\ntype11 &lt;text, varchar&gt;,\r\ntype12 timestamp,\r\ntype13 variant,\r\n);<\/pre>\n<p><span style=\"font-weight: 400\">Now, go through the table below to know about the data storage in the data types.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b><i>Name<\/i><\/b><\/td>\n<td><b><i>Data type<\/i><\/b><\/td>\n<td><b><i>Data stored<\/i><\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type1<\/span><\/td>\n<td><span style=\"font-weight: 400\">Boolean<\/span><\/td>\n<td><span style=\"font-weight: 400\">True,false<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type2<\/span><\/td>\n<td><span style=\"font-weight: 400\">Blob<\/span><\/td>\n<td><span style=\"font-weight: 400\">\/\/binary large objects <\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type3<\/span><\/td>\n<td><span style=\"font-weight: 400\">ASCII<\/span><\/td>\n<td><span style=\"font-weight: 400\">65(A), 97(a) etc<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type4<\/span><\/td>\n<td><span style=\"font-weight: 400\">Bigint<\/span><\/td>\n<td><span style=\"font-weight: 400\">-2^32 to +2^32 (only integers)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type5<\/span><\/td>\n<td><span style=\"font-weight: 400\">Counter<\/span><\/td>\n<td><span style=\"font-weight: 400\">1,2,3&#8230;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type6<\/span><\/td>\n<td><span style=\"font-weight: 400\">Decimal<\/span><\/td>\n<td><span style=\"font-weight: 400\">1,2,-2&#8230;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type7<\/span><\/td>\n<td><span style=\"font-weight: 400\">Double<\/span><\/td>\n<td><span style=\"font-weight: 400\">-2^32 to +2^32 (all real numbers)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type8<\/span><\/td>\n<td><span style=\"font-weight: 400\">Float<\/span><\/td>\n<td><span style=\"font-weight: 400\">-2^16 to +2^16 (all real numbers)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type9<\/span><\/td>\n<td><span style=\"font-weight: 400\">Inet<\/span><\/td>\n<td><span style=\"font-weight: 400\">AXHFD327864SAF etc<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type10<\/span><\/td>\n<td><span style=\"font-weight: 400\">Int<\/span><\/td>\n<td><span style=\"font-weight: 400\">-2^16 to +2^16 (only integers)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type11<\/span><\/td>\n<td><span style=\"font-weight: 400\">Text, varchar<\/span><\/td>\n<td><span style=\"font-weight: 400\">79-*($wkjh#$ etc<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type12<\/span><\/td>\n<td><span style=\"font-weight: 400\">Timestamp<\/span><\/td>\n<td><span style=\"font-weight: 400\">2018-05-18 03:21+0530 etc<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type13<\/span><\/td>\n<td><span style=\"font-weight: 400\">Variant<\/span><\/td>\n<td><span style=\"font-weight: 400\">123,34,2213 etc<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/cassandra-user-defined-types\/\">Let&#8217;s discuss Cassandra User Defined Types<\/a><\/strong><\/p>\n<h3>b. Collection Data Type<\/h3>\n<p><span style=\"font-weight: 400\">This data type use for collective data used in a single variable. Cassandra Query Language provides three type of collection data type.<\/span><\/p>\n<div id=\"attachment_16479\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Collection-Data-Type.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-16479\" class=\"wp-image-16479 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Collection-Data-Type.png\" alt=\"Cassandra Data Types\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Collection-Data-Type.png 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Collection-Data-Type-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Collection-Data-Type-300x157.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Collection-Data-Type-768x402.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Collection-Data-Type-1024x536.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-16479\" class=\"wp-caption-text\">Cassandra Data Types- Collection Data Type<\/p><\/div>\n<p><strong>i. List<\/strong><br \/>\n<span style=\"font-weight: 400\">This Cassandra data type represents a collection of one or more elements in a table.<\/span><\/p>\n<p><strong>ii. Map<\/strong><br \/>\n<span style=\"font-weight: 400\">This data type represents a collection of key-value pairs.<\/span><\/p>\n<p><strong>iii. Set<\/strong><br \/>\n<span style=\"font-weight: 400\">This Cassandra data type represents a collection of one or more sorted elements in a table.<\/span><br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/cassandra-features\/\">Let&#8217;s revise\u00a05 Important Cassandra Features<\/a><\/strong><\/p>\n<h3>c. User-Defined Data Type<\/h3>\n<p><span style=\"font-weight: 400\">CQL enables the user to create their own data type as per their requirement. After creating data type and fields in it the user can alter, verify and even drop a field or the whole data type.<\/span><\/p>\n<p>So, this was all about Cassandra Data Types. Hope you like our explanation of data types in Cassandra CQL.<\/p>\n<h2>4. Conclusion<\/h2>\n<p><span style=\"font-weight: 400\">Hence, in this Cassandra Data Types tutorial, we studied 3 major data types: Built-in, Collection, and User-Defined Cassandra Data Types. Moreover, we saw many data types in Built-in Data Type. <\/span><\/p>\n<p><span style=\"font-weight: 400\">At last, we discussed Cassandra set data type, Cassandra map data type. In the next article, we will go through Collection Data Type in a detailed manner. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Furthermore, for any query, feel free to ask through the comment section.<\/span><br \/>\nSee also &#8211;\u00a0<strong><a href=\"https:\/\/data-flair.training\/blogs\/hbase-vs-cassandra\/\">HBase vs Cassandra \u2013 Major Difference &amp; Similarities in 2018<\/a><\/strong><br \/>\n<a href=\"http:\/\/cassandra.apache.org\/doc\/latest\/cql\/types.html\"><strong>For reference<\/strong><\/a><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1928,&quot;href&quot;:&quot;http:\\\/\\\/cassandra.apache.org\\\/doc\\\/latest\\\/cql\\\/types.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20210506234226\\\/https:\\\/\\\/cassandra.apache.org\\\/doc\\\/latest\\\/cql\\\/types.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 11:04:26&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-14 05:12:54&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-18 08:30:53&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-24 02:39:30&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-27 16:34:56&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-31 02:27:21&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-05 08:06:47&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-13 06:48:10&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-16 22:19:33&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-21 03:23:30&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-28 06:41:17&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-04 11:02:25&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-08 15:09:03&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-15 02:48:12&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-02 11:07:31&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-05 20:29:20&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-10 10:25:44&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-14 23:14:32&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-03 16:19:08&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-08 07:44:14&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-18 09:23:25&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-22 09:59:00&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-12 07:20:42&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-23 10:57:53&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-30 00:58:41&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-10 13:09:09&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-14 11:06:19&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-17 14:23:16&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-22 17:34:09&quot;,&quot;http_code&quot;:404}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-22 17:34:09&quot;,&quot;http_code&quot;:404},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Objective In our previous Cassandra article, we went through the CURD\u00a0operations in Cassandra. In this article, we will study the Cassandra Data Types. Moreover, in CQL data types we will see 3 different&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":16481,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[2220,2344,2345,2348,2386,2630,3014,3026,3220,3484,15332,15348],"class_list":["post-16465","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cassandra","tag-built-in-data-type","tag-cassandra-data-type-list","tag-cassandra-data-types","tag-cassandra-decimal-precision","tag-cassandra-set-data-type","tag-collection-data-type","tag-counter","tag-cql-data-types","tag-custom-cassandra-data-type","tag-data-types-in-cassandra","tag-varchar","tag-variant"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Cassandra Data Types | Built-in, Collection, User-defined - DataFlair<\/title>\n<meta name=\"description\" content=\"Cassandra Data Types,Types of data types in Cassandra CQL,built-in data type:ascii,boolean,bigint,counter,decimal,collection data type,user defined datatype\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cassandra Data Types | Built-in, Collection, User-defined - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Cassandra Data Types,Types of data types in Cassandra CQL,built-in data type:ascii,boolean,bigint,counter,decimal,collection data type,user defined datatype\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-04T06:16:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-05T08:15:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cassandra Data Types | Built-in, Collection, User-defined - DataFlair","description":"Cassandra Data Types,Types of data types in Cassandra CQL,built-in data type:ascii,boolean,bigint,counter,decimal,collection data type,user defined datatype","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/","og_locale":"en_US","og_type":"article","og_title":"Cassandra Data Types | Built-in, Collection, User-defined - DataFlair","og_description":"Cassandra Data Types,Types of data types in Cassandra CQL,built-in data type:ascii,boolean,bigint,counter,decimal,collection data type,user defined datatype","og_url":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-06-04T06:16:44+00:00","article_modified_time":"2021-04-05T08:15:19+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"Cassandra Data Types | Built-in, Collection, User-defined","datePublished":"2018-06-04T06:16:44+00:00","dateModified":"2021-04-05T08:15:19+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/"},"wordCount":1109,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg","keywords":["Built-in data type","Cassandra data type list","Cassandra Data Types","cassandra decimal precision","cassandra set data type","collection data type","counter","CQL Data Types","custom Cassandra data type","Data Types in Cassandra","varchar","variant"],"articleSection":["Cassandra Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/cassandra-data-types\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/","url":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/","name":"Cassandra Data Types | Built-in, Collection, User-defined - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg","datePublished":"2018-06-04T06:16:44+00:00","dateModified":"2021-04-05T08:15:19+00:00","description":"Cassandra Data Types,Types of data types in Cassandra CQL,built-in data type:ascii,boolean,bigint,counter,decimal,collection data type,user defined datatype","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/cassandra-data-types\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Cassandra-Data-Types-01.jpg","width":1200,"height":628,"caption":"Cassandra Data Types"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/cassandra-data-types\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Cassandra Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/cassandra\/"},{"@type":"ListItem","position":3,"name":"Cassandra Data Types | Built-in, Collection, User-defined"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team specializes in creating clear, actionable content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Backed by industry expertise, we make learning easy and career-oriented for beginners and pros alike.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam3\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/16465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=16465"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/16465\/revisions"}],"predecessor-version":[{"id":90503,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/16465\/revisions\/90503"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/16481"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=16465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=16465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=16465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}