Questions tagged [amazon-redshift]

Amazon Redshift is a petabyte-scale data warehousing service using existing business intelligence tools to analyze the data. Redshift is a column-oriented MPP database based on ParAccel and ParAccel was itself based on PostgreSQL.

Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse service that makes it simple and cost-effective to efficiently analyze all your data using your existing business intelligence tools. It is optimized for datasets ranging from a few hundred gigabytes to a petabyte or more. Redshift is a column-oriented database based on PostgreSQL 8.0.2

Source: Amazon Redshift

Although Redshift to some extent is based on PostgreSQL they are substantially different. Do not add the postgresql tag to questions involving Amazon Redshift

Related Tags

8534 questions
22
votes
5 answers

Count distinct multiple columns in redshift

I am trying to count rows which have a distinct combination of 2 columns in Amazon redshift. The query I am using is - select count(distinct col1, col2) from schemaname.tablename where some filters It is throwing me this error - Amazon Invalid…
Janusz01
  • 507
  • 2
  • 4
  • 12
22
votes
5 answers

Alternatives of array_agg() or string_agg() on redshift

I am using this query to get the aggregated results: select _bs, string_agg(_wbns, ',') from bag group by 1; I am getting this error: Error running query: function string_agg(character varying, "unknown") does not exist HINT: No function matches…
Bhawan
  • 2,441
  • 3
  • 22
  • 47
22
votes
3 answers

Defining a Redshift connection in DataGrip

I'm trying to define a Redshift connection in DataGrip but couldn't find any Redshift driver in the UI. I tried using both Postgres and generic Database Driver with no luck. Has someone been able to configure this?
Ziv Gabovitch
  • 735
  • 1
  • 7
  • 18
22
votes
1 answer

Redshift: creating a table with Timestamp column defaulting to Now()

Is there a way to create a table with a timestamp column defaulting to now? Any of the following succeeds on creation but fails on insertion. CREATE TABLE MyTable ( device_id VARCHAR(64) NOT NULL encode lzo, app_id VARCHAR(150)…
isaac.hazan
  • 3,772
  • 6
  • 46
  • 76
21
votes
1 answer

Redshift DISTKEY / SORTKEY

I have a very technical question about how Redshift deals with DISTKEY and SORTKEY internally in order to fulfill the storing tier and the query execution demands. I have read this amazing post that explains very well what means each of these…
21
votes
6 answers

Pivot for redshift database

I know this question has been asked before but any of the answers were not able to help me to meet my desired requirements. So asking the question in new thread In redshift how can use pivot the data into a form of one row per each unique dimension…
ankitkhanduri
  • 315
  • 1
  • 2
  • 9
21
votes
4 answers

Is there any way to find table creation date in redshift?

I am having trouble with finding table creation date in Amazon Redshift. I know svv_table_info will give all the info about the table but the creation date.Can anyone help please?
Kamlesh Gallani
  • 701
  • 1
  • 9
  • 16
21
votes
1 answer

How to get a list of UDFs in Redshift?

Is there an easy way to get the list of all UDFs that are available in Redshift? Moreover, I would like to find UDFs with parameter types and search for UDFs by name.
volodymyr
  • 7,256
  • 3
  • 42
  • 45
21
votes
4 answers

SQL workbench Error while connecting to Redshift

I am trying to create a table in aws redshift using sqlwork bench. I am able to connect redshift but while executing below script, I am getting connection aborted error. Please let me know if any one has any solution. CREATE TABLE actual_report ( …
user3858193
  • 1,320
  • 5
  • 18
  • 50
21
votes
3 answers

Redshift psql auto increment on even number

I am trying to create a table with an auto-increment column as below. Since Redshift psql doesn't support SERIAL, I had to use IDENTITY data type: IDENTITY(seed, step) Clause that specifies that the column is an IDENTITY column. An IDENTITY…
peipei
  • 1,407
  • 3
  • 14
  • 22
20
votes
1 answer

How can I limit DBeaver Data Editor to limit result set size?

How can I limit DBeaver Data Editor to limit the result set size? I know the default is 200 and we can configure it in settings/preferences for the "Data Editor" section but this filter seems to be applied after all the results are already fetched…
annunarcist
  • 1,637
  • 3
  • 20
  • 42
20
votes
1 answer

How to find the list of databases within an AWS Redshift cluster

I want to list out all the existing databases within a Redshift cluster. How can I do that. What SQL query can I fire such that it sends me a list of all the databases within the AWS cluster
Arafat Nalkhande
  • 11,078
  • 9
  • 39
  • 63
20
votes
5 answers

AWS Kinesis Firehose not inserting data in Redshift

I try to have a Kinesis Firehose pushing data in a Redshift table. The firehose stream is working and putting data in S3. But nothing arrive in the destination table in Redshift. In the metrics DeliveryToRedshift Success is 0 (DeliveryToRedshift…
mathieu
  • 2,330
  • 2
  • 24
  • 44
20
votes
3 answers

How to Insert TIMESTAMP Column into Redshift

I created a table in Redshift: create table myTable ( dateTime TIMESTAMP NOT NULL, ... ); However, when I try to insert a record that contains a dateTime of, I get an error from stl_load_errors. 20080215 04:05:06.789 Since I took…
Kevin Meredith
  • 41,036
  • 63
  • 209
  • 384
20
votes
3 answers

How does Tableau run queries on Redshift? (And/or why can't Redshift display Tableau queries?)

I'm kicking tires on BI tools, including, of course, Tableau. Part of my evaluation includes correlating the SQL generated by the BI tool with my actions in the tool. Tableau has me mystified. My database has 2 billion things; however, no matter…
user717847
  • 695
  • 1
  • 6
  • 16