Category "amazon-redshift"

SQL-how can i product/ multiply across partitions with window functions

The input I have is composed of the following columns: time, UseID, and value. I want to get the plt column as the product of successive numbers. I know about t

Redshift: How to list all users in a group

Getting the list of users belonging to a group in Redshift seems to be a fairly common task but I don't know how to interpret BLOB in grolist field. I am liter

Redshift split single dynamic column into multiple rows in new table

With a table like: uid | segmentids -------------------------+---------------------------------------- f9b6d54b-c646-4bbb-b0ec

Getting the "size" of a view in Redshift

Essentially, I'm trying to figure out the size table foo will be after executing: CREATE TABLE foo AS ( SELECT * FROM my_view ); My gut tells me that the

Redshift split single dynamic column into multiple rows in new table

With a table like: uid | segmentids -------------------------+---------------------------------------- f9b6d54b-c646-4bbb-b0ec

Redshift: copy command Json data from s3

I have the following JSON data. { "recordid":"69", "recordTimestamp":1558087302591, "spaceId":"space-cd88557d", "spaceName":"Kirtipur", "partn

Not able to populate AWS Glue ETL Job metrics

I am trying to populate maximum possible Glue job metrics for some testing, below is the setup I have created: A crawler reads data (dummy customer data of 500

Query cannot run because wlm_query_slot_count is greater than the query concurrency for the queue increase query concurrency if you need more slots

I am new to WLM I have created 2 queues in Manual WLM. now when I am running queries it is throwing the below errors: Amazon Invalid operation: The query cannot

Achieving High Availability for Redshift?

It is my understanding that Redshift is built for performance but not for Availability. The documentation https://aws.amazon.com/redshift/faqs/ suggest that on

Getting Exception while inserting data in Redshift DB

while fetching data from database It is working fine when trying to insert data in Redshift database getting exception MY POJO class : Quote.java @Entity publi

Column is of type timestamp without time zone but expression is of type character

I'm trying to insert records on my trying to implement an SCD2 on Redshift but get an error. The target table's DDL is CREATE TABLE ditemp.ts_scd2_test (

Deterministic sort order for window functions

I've a status table and I want to fetch the latest details. Slno | ID | Status | date 1 | 1 | Pass | 15-06-2015 11:11:00 - this is inserted first 2

Why are my tables not listed in the Redshift pg_table_def system table?

So I have created some tables: But they are not listed when I query pg_table_def? Any ideas appreciated.

How to list all tables and their creators (or owners) in Redshift

I thought it is straightforward but I couldn't find a way to list all tables and their creators (or owners) in Redshift. Any help/insight is welcome.

How to handle quoted values in AWS Redshift unload command?

Suppose, following the AWS docs I'd like to use an unload command like unload ( 'SELECT * FROM table_name WHERE day = '2019-01-01' ') to 's3://bucket_name/

how to unload only 1000 rows from redshift tables

I am creating a copy of a production redshift database at a development level. I know how to unload data from my production instance/cluster to s3, then copy t

What is the best way to paginate redshift queries?

What is the best way to paginate redshift query results?

How to find 2nd and 3rd occurrence char(,) in column in redshift db?

In redshift i am using below code.but i am getting first special character position only. SELECT id,regexp_instr(id,',') ,regexp_instr(id,',',2)FROM test

Redshift Spectrum table doesnt recognize array

I have ran a crawler on json S3 file for updating an existing external table. Once finished I checked the SVL_S3LOG to see the structure of the external table a