69 questions
1
vote
1
answer
134
views
How to handle idle sessions in Redshift Serverless?
We are using Amazon Redshift Serverless as our primary database, with a maximum of 8 RPUs. To optimize costs, we recently reduced the idle session timeout from the default of 1 hour down to 10 minutes....
1
vote
0
answers
156
views
Create users using IAM Role in Redshift Serverless
I want to invoke execute_statement API of Redshift Serverless with a create user statement like CREATE USER "john" PASSWORD 'johnDoe1';. However, when I do this via Python script (or ...
0
votes
1
answer
94
views
Cant drop Redshift Copy Job
I've created a Copy job using the following:
COPY public.test_table
FROM 's3://<s3_bucket>/<table_prefix>
IAM_ROLE '...'
format as csv
IGNOREHEADER 1
JOB CREATE copy_test_delete_me AUTO ON ...
0
votes
0
answers
52
views
Create Redshift-managed VPC endpoint
I'm trying to create an endpoint for a Redshift serverless cluster in a different account, I granted access to it to the new account and in the form for creating the endpoint (see image I can see in ...
0
votes
2
answers
89
views
In AWS Redshift, are there errors that can cause a stored procedure to stop, even when having a error handling block?
I wrote a stored procedure that calls other procedures inside multiple transaction blocks (BEGIN…END) with their own error handlers. I expected that if one block encounters an exception, it would go ...
0
votes
2
answers
950
views
ERROR: permission denied for relation stl_query, how to resolve?
I am trying out Redshift and at first, I am trying to access queries I ran in the past but was hit by this error: ERROR: permission denied for relation stl_query and tried to grant access as well but ...
0
votes
1
answer
153
views
Is there any way to get more detailed syntax error messages in Redshift SQL?
I am re-writing some 1000+ line queries which were written originally for a PostgreSQL DB and now have to run on near-identical data in Redshift (using Redshift Serverless and the QueryEditorV2). This ...
1
vote
1
answer
78
views
Handling nested fields in Amazon Redshift using COPY command when loading from dynamo db source
I am trying to load data into Redshift from a DynamoDB table. The table includes nested fields which does not get fetched correctly. The data inside the DynamoDB has structure like
"Status": ...
1
vote
1
answer
141
views
Is there a way to provide values for columns separately in COPY command while loading from parquet file to redshift
I have a parquet file which I need to load into Redshift.
I'm using COPY command to do that.
But there are also other columns in the table which needs to have values inserted along with the COPY ...
0
votes
0
answers
167
views
How to reduce storage space used in redshift serverless?
I have S3 bucket which contains parquet files which are not more than 20 MB in size (all parquets combined).
I'm loading these files into AWS Redshift serverless tables using COPY command.
But after ...
0
votes
1
answer
93
views
How to automatically get table create statement for Redshift serverless from Pandas dataframe
I have an S3 bucket which contains parquet files.
I need to analyse that parquet file and create the required table in Redshift serverless.
import pyarrow.parquet as pq
df = pq.read_table(f"s3://{...
0
votes
2
answers
364
views
How to add "Granted accounts" for Redshift Serverless Workgroup with Terraform?
I want to grant access to my Redshift Serverless workgroup so other specified accounts to create Redshift-managed VPC endpoints.
In the workgroup view in the console, it looks like it is an attribute ...
0
votes
1
answer
175
views
How to create 1000s of tables in redshift serverless automatically using boto3?
I have an S3 bucket which contains 1000s of folders which are basically table_names and those contains parquet files.
I'm trying to create tables with that schema in redshift.
I'm using redshift-data ...
0
votes
1
answer
528
views
No IAM role showing up when scheduling query in redshift serverless from root user
I am trying to schedule a query in redshift serverless using query scheduler v2.
I have created a role copy-s3-to-redshift, with permissions as
AmazonEventBridgeFullAccess
...
0
votes
1
answer
102
views
Scheduled task Failing - Redshift
I have a scheduled task that calls a stored procedure in a Redshift database. If I execute it manually, it works fine, only the scheduled is failing, but I'm not able to see WHY the query is failing. ...
0
votes
2
answers
261
views
Amazon Glue - load to Redshift failures with decimal fields
I have a very simple Glue job loading data from S3 to Redshift, with a Transform in between to rename fields and change their types:
First execution runs (almost) without issues - data gets loaded ...
5
votes
3
answers
3k
views
AWS Redshift Serverless IAM Identity Center Autnethication not working
I am trying to use Redshift Query Editor V2 authenticating via IAM Identity Center. These were my setup steps:
Created IAM Identity Center in the same region as the Serverless Workgroup
Created a ...
0
votes
2
answers
81
views
delete duplicates based on a combination of 2 columns
I consider a row duplicate when the combination of hash_key and load_date is repeating. I can find such rows using this CTE:
with w_duplicated_rows as (
select hash_key, load_date, count(*),
--...
0
votes
0
answers
695
views
When using .NET to connect to AWS Redshift Serverless, tables I created cannot be seen
I am using .NET 6.0 with Visual Studio + AWS Explorer plugin that has my credential saved. I created a simple table consisting of first name and last name.
create table name(
firstname varchar(200),
...
0
votes
0
answers
144
views
data table size is too large when load data from RDS into Redshift using Glue
I am new to data engineer and I try to load 3 data tables from RDS into Redshift using AWS Glue.
3 tables in RDS only have maximum size over 100Mb. But when I load data using Glue (or copy command in ...
0
votes
1
answer
2k
views
How to write an SQL "in" query on a SUPER data type column
I have a simple table in redshift with the below schema:
Column | Type | Collation | Nullable | Default
-----------------+-----------------------------+-----------+---...
0
votes
2
answers
707
views
Aggregating data by month using SQL in metabase from redshift
I hope you are doing well,
I am working on aggregating data by month,
Note: I am querying data from Redhsift using Metabase.
This is my query:
(SELECT
dataset.value AS value,
TO_CHAR(...
1
vote
1
answer
502
views
Issue when trying to drop group from aws redshift cluster
I'm trying to drop a group from my redshift cluster.
drop group conform_main_prtest_admin_dev;
This command give me the error,
ERROR: group "conform_main_prtest_admin_dev" cannot be dropped ...
0
votes
1
answer
1k
views
Redshift Serverless Terminate Active Connections?
I have a Redshift Serverless database that I need to delete. When I run the command:
drop database [my_database_name]
an error is returned:
SQL Error [55006]: ERROR: database "[my_database_name]...
0
votes
1
answer
1k
views
Issues connecting to AWS Redshift Serverless DB using Python redshift_connector
I am trying to connect to a Redshift serverless db I created on AWS using local python code. The db has data, and I can query it using query editor v2, however I am having issues connecting to it in ...
0
votes
0
answers
93
views
Redshift serverless client api call list_workgroups gets timedout in lambda function
I have a lambda function which uses below code to list redshift serverless workgroups.
client = boto3.client("redshift-serverless")
res = client.list_workgroups()
I have configured local ...
0
votes
1
answer
159
views
Load fixed width file(Unit separator) into Redshift table using copy command
I have fixed the width file with a unit separator.All records are in one row separated by a unit separator(US). This file has no header(no column names) but the header and trailer.I tired with the ...
1
vote
2
answers
2k
views
Error while connecting AWS Glue to Redshift Serverless Workspace
I am using AWS Glue to migrate data from Glue Catalog to Redshift Serverless and S3 after some transformations.
Since, I am learning Glue, I am using the Redshift Serverless to save my money.
So, I ...
1
vote
0
answers
511
views
How to query AWS Redshift Serverless as a Federated user via Lambda?
I am trying to run queries on AWS Glue Data Catalog as a Federated user from Python script in Lambda, but I am facing the issues:
The first issue - I cannot find appropriate way to connect as ...
2
votes
0
answers
194
views
Using CloudFormation, how do I associate a VPC to a Redshift Serverless workgroup?
The AWS::RedshiftServerless::Workgroup Cloudformation spec does not have a VPC property, but it has subnets and security groups:
Example:
RedshiftServerlessNamespace:
Type: AWS::RedshiftServerless::...
0
votes
0
answers
707
views
Create aws redshift serverless using cloudformation template
Can anyone share a basic template to create redshift serverless cluster. It include creating namespace, workgroup. I tried with following template however it's giving error as
At least one Resources ...
1
vote
1
answer
599
views
Redshift Serverless Restore from Redshift Snapshot is failing with No Resource Policy
I shared a Redshift snapshot from Account A to Account B.
When I try to restore the snapshot in Account B, I am getting an AccessDenied exception stating that no resource policy can be found:
The ...
2
votes
0
answers
831
views
AWS Redshift Serverless Data Catalog Auto-mount not working properly
I am relatively new to Redshift Serverless. My goal is to perform ETL tasks on data currently stored in S3 and available in the Glue Data Catalog. I can see the 'awsdatacatalog' schema in query editor ...
0
votes
1
answer
192
views
COPYing of JSON files from S3 to Redshift serverless times out?
Problem: The query below worked fine a few days ago and took only a few seconds to execute (it's only 20 small JSON files). However, now it times out after 45min. I haven't touched redshift or the ...
0
votes
1
answer
2k
views
How to connect to Redshift serverless (using CLI)?
Given a Redshift serverless cluster and a dummy_table,
when trying to connect to it in the AWS Cloudshell using aws redshift-data execute-statement --endpoint-url https://default.XXXXXXXXX.eu-central-...
0
votes
0
answers
1k
views
Redshift - Cross-database reference insert - Is it possible?
I have a question about cross database referencing in a Redshift cluster that we are doing a POC on. The basic question is, is it possible to do an insert from a connection on one database in the ...
1
vote
0
answers
157
views
In AWS Redshift Serverless is there a svl_udf_log table or view ? If No what is the alternative?
My fundamental question is, how to debug a UDF in Redshift serverless environment? SQL clients suggest to use svl_udf_log but I do not find that.
1
vote
0
answers
188
views
Connecting to redshift from powerBI using an private hosted zone alias created in Route53
I have a redshift serverless workgroup (not public) that I can connect to from powerBI using the AWS generated redshift workgroup URL. However I want to provide a easy to remember URL to everyone to ...
0
votes
1
answer
534
views
Redshift VACUUM effect on concurrent queries
I have a process that runs VACUUM manually on a list of redshift tables on a daily basis to maintain consistent query performance. But sometimes, vacuuming one table takes about 2 hours. Is this ...
-1
votes
1
answer
2k
views
Why does the Auto Copy Job function on AWS Redshift not suported?
I want to do continuous file ingestion from Amazon S3 to AWS Redshift, but the Auto Job copy doesn't work.
COPY "prueba 8"
FROM 's3://xxxxxxxxxxxx'
IAM_ROLE 'xxxxxxxxxxxxxxxxxxxxxxxxxx'
...
0
votes
2
answers
917
views
Connect to Redshift Serverless across accounts
I have account A with AWS Redshift Serverless namespace and workgroup.
The workgroup is not public accessable.
I want to connect from AWS account B to the namespace on account A.
How is that possible?
...
0
votes
1
answer
2k
views
Can provisioned Redshift clusters and Serverless Redshift clusters share data when they are in the same region and under the same account?
Can provisioned Redshift clusters and Serverless Redshift clusters share data when they are in the same region and under the same account?
I created a data share in the provisioned Redshift cluster ...
1
vote
1
answer
3k
views
Redshift Serverless Error: incompatible Parquet schema for default integer during COPY
I'm using a Python script to read a CSV file using Pandas, add some metadata columns to it, generate a parquet file and finally COPY it into Redshift Serverless. However, Redshift Serverless complains ...
0
votes
1
answer
403
views
Error when running redshift query through AWS sdk from a lambda
I have a problem when I try to run Redshift query from a AWS lambda function by using the AWS sdk @aws-sdk/client-redshift-data.
I have a Redshift serverless cluster.
This error is returned:
Error: ...
1
vote
2
answers
2k
views
Redshift serverless charged_seconds and compute_seconds
I am trying to understand pricing for Redshift Serverless but slightly confused between compute_seconds and charged_seconds.
I have currently set base RPU to 128 which is the default.
I have have ...
3
votes
1
answer
522
views
Working with Datawarehouse for Multi-tenancy
We have Multi-tenancy application where we have separate database for each client in MongoDB, PostgreSQL & separate Index in ElasticSearch.
Now we are planning for Datawarehouse to be created in ...
1
vote
1
answer
1k
views
Add Datashare to existing database in redshift
I created a datashare in Serverless cluster.
Now I want to add that datashare in Provisioned cluster.
Simplest way is to create a new database using below command.
CREATE DATABASE temp_db FROM ...
0
votes
1
answer
2k
views
AWS Redshift Serverless full executed queries
We are trying to use redshift serverless. It shows the query history is stored in the table sys_query_history.
But looking at the table, the query_text field has a 4000 characters limit. They'd ...
1
vote
0
answers
597
views
Why do I get a SQL error near "LIMIT" in Redshift when I don't include the word "limit" anywhere in the query?
I have tried to run the following SQL query in Amazon Redshift serverless many times now and it keeps failing:
with ssr as
(select s_store_id,
sum(sales_price) as sales,
sum(profit) ...
1
vote
1
answer
3k
views
Using AWS Redshift Data API to access RedshiftServerless
Been banging my head on this for a while now. I have an AWS Redshift Serverless Workspace set up. I have loaded data to a table and am able to query it using the AWS browser tool.
Using the AWS CLI, I ...