Category "amazon-redshift"

Redshift SQL Query Between Current Date and 7 days ago

I've been trying to filter the data for the last X number of days. All these columns work as standalone results when I remove the time filter from the where cla

How to create External Table without specifying columns in Redshift?

I have a folder containing files in parquet format. I used crawler to create table defined in Glue Data Catalog which counted to 2500+ columns. I want to create

Redshift json_serialize double quotes

I am ingesting (COPY) json data from S3. Initially storing in a single SUPER column, and then extracting out the individual attributes into a normalised table/c

SQL - Find customers who bought all products

Suppose I have 2 tables: Table A C_ID P_ID 1 1 1 2 2 1 Table B P_ID 1 2 In Table A, C_ID and P_ID serve as PK, in Table B P_ID

Redshift design or configuration issue? - My Redshift datawarehouse seems much slower than my mysql database

I have a Redshift datawarehouse that is pulling data in from multiple sources. One is my from MySQL and the others are some cloud based databases that get pulle

YYYYWW format in SQL Redshift

My company recently migrated to Redshift from Redash recently and I'm having a hard time recreating the YEARWEEK() function available in MySQL but not in Redshi

Redshift: cannot drop user owner default privileges

I'm trying to delete an user from my database but I'm getting an error: user "ted.mosby" cannot be dropped because some objects depend on it Detail: owner of d

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.