Category "amazon-redshift"

Amazon Redshift- How to get start date of the Week from existing daily date field from the table?

I am trying to get start date of the week from existing daily date field from the same table. For example daily dates from 05/08/2022 to 05/14/2022 , the start

Multiple values inside SQL LIKE

This is working: SELECT * FROM table WHERE name LIKE '%ab_cd%' How to include '%ef_gh%' in a single/multiple statement? My try: SELECT * FROM table WHERE name

how to write a Trigger to insert data from aurora to redshift

I am having some data in aurora mysql db, I would like to do two things: HISTORICAL DATA: To read the data from aurora(say TABLE A) do some processing and updat

Getting Spectrum Scan Error code 15007 on select query on redshift external table

I have created a external table in redshift spectrum.Upon running the select * from table_name, i am getting following error SQL Error [XX000]: ERROR: Spectrum

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