How to Find Redshift Table Size? – Examples

Amazon Redshift is a fully managed, distributed relational database on the AWS cloud. Hardware's are completely managed by the Amazon and to make database administrator life easy, it has bundled with many system tables. Those system tables hold abundant information about your database, tables, rows, statistics and many more. You can use these system tables to find Redshift table size without giving a second thought. How to Find Redshift Table Size? When you create a table in Redshift database, the table does not consume any space on the data slices…

Comments Off on How to Find Redshift Table Size? – Examples

Redshift DECODE Function Syntax and Examples

Amazon Redshift supports the DECODE function and it is similar to DECODE function in other relational databases such as Oracle, SQL Server, MySQL, Netezza, etc. You can use the Redshift DECODE function to implement the simple CASE conditional statement or an if-then-else statement. This command is a shorthand form of the Redshift CASE Conditional function. Redshift DECODE Function A DECODE expression in Redshift replaces a specific value with either another specific value or a default value, depending on the result of an equality condition. The DECODE function operation is equivalent…

Comments Off on Redshift DECODE Function Syntax and Examples

Generate Redshift DDL using System Tables

Amazon Redshift is a fully managed, distributed relational database on the AWS cloud. Amazon will manage the hardware's and your only task is to manage databases that you create as a result of your project. In this article, we will check one of the administrator tasks, generate Redshift view or table DDL using System Tables. Generate Redshift DDL using System Tables Amazon Redshift support many system tables, that will make your life easier as a database administrator. All the activity information's such as executed query, DDL, memory information, etc. are…

Comments Off on Generate Redshift DDL using System Tables

Redshift Split Delimited Fields into Table Records and Examples

Amazon Redshift is relatively new to relational databases. It is based on PostgreSQL, but being a columnar distributed database, it does not support all functions that are available in PostgreSQl. One of such requirement is split a delimited string into rows. In this article, we will check how to split delimited fields into table records or rows using Redshift built in function. Not that, the method described in this article usually works when you have a fixed number of delimited fields in your input string. Say, you have 5 delimited…

Comments Off on Redshift Split Delimited Fields into Table Records and Examples

Amazon Redshift DUAL Table Alternative

Amazon Redshift like most of the PostgreSQL relation databases like Netezza or Vertica does not provide support for dual system table. You can simply use the SELECT clause with nothing to display the results. In this article, we will check what is Amazon Redshift dual table alternative and how to use it. What is DUAL table? The DUAL is special one row, one column table present by default in databases. The database like, oracle automatically create dual table and grant SELECT access to all users by default. The dual table…

Comments Off on Amazon Redshift DUAL Table Alternative

Psql Windows Exit Status Codes – Explanation

The psql is a command line interface to connect to any postgreSQL relational database systems such as Redshift, Greenplum, etc. You can connect to your Redshift or any other PostgreSQL system using psql and execute queries without needing any particular tool. Your psql execution command may get fail and you need a status code to provide a proper error message to client. In this article, we will check what are psql windows exit status codes with explanation. Psql Windows Exit Status Codes When you execute queries interactively using psql prompt…

Comments Off on Psql Windows Exit Status Codes – Explanation

How to Select Redshift Sort Key- Choose Best Sort Key

Amazon Redshift is fully managed, distributed, petabyte scale relational database system on Amazon web services (AWS). Redshift is a columnar database, it is capable of performing complex queries efficiently over petabytes of data. You can scale the database based on your needs and handle growing datasets. Redshift comes with built-in query optimization features. As a part of performance enhancement step, you can distributes table data on particular column(s). Another important feature is the Redshift sort key to boost your Redshift data access mechanism. In this article, we will check how…

Comments Off on How to Select Redshift Sort Key- Choose Best Sort Key

Redshift Integer Value Check – Methods and Examples

When you work on the different data sources and trying to load data to Redshift from multiple sources, you might encounter type cast issues such as characters in integer column and that leads the loading to fail. Hence, it is very important to perform integer value check when you are not sure about source data types. In this article, we will check how to performance integer value check in Redshift database. Why you should check for Integer values in Redshift? When you are working on the data warehouse and heterogeneous…

Comments Off on Redshift Integer Value Check – Methods and Examples

Amazon Redshift json Functions and Examples

Amazon Redshift stores json data in a single column. When you need to store a relatively small set of key-value pairs in your Redshift database, you might save space by storing the data in JSON format. In this article, we will check what are Redshift json functions with some examples. Amazon Redshift json Functions and Examples Page Contents Introduction JSON Functions in Amazon Redshift Common JSON Functions in Amazon Redshift - Syntax and Examples Advanced JSON Functions in Amazon Redshift - Syntax and Examples Best Practices for Using JSON Functions…

Comments Off on Amazon Redshift json Functions and Examples

Redshift Pattern Matching Conditions – LIKE, SIMILAR TO, POSIX Operators

Amazon Redshift supports several pattern matching techniques that you can use to search for specific strings or patterns of characters within your data. Redshift Pattern Matching Amazon Redshift pattern matching conditions are used to search a string for a given pattern. You can search for the string by matching particular patterns. Page Contents Introduction to Redshift Redshift Pattern Matching - Syntax and Examples Redshift Pattern Matching Performance Considerations Conclusion Introduction to Redshift Amazon Redshift is a fully managed cloud-based data warehousing solution designed for large-scale data processing and analysis. It's…

Comments Off on Redshift Pattern Matching Conditions – LIKE, SIMILAR TO, POSIX Operators