Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
2 answers
85 views

I am developing an API that takes a SQL query as input and runs it on AWS Redshift. I do not want user to provide commands like update, drop, truncate, delete and ... - I only want the user to use ...
Srihari Vithalapur's user avatar
Best practices
0 votes
0 replies
60 views

Imagine there's a reporting tool for which users might have the permission 'Admin' or 'User'. We have a dimension in our models called admin_view and if the value is true then only users with Admin ...
Objectionne's user avatar
0 votes
1 answer
33 views

AWS documentation for querying Redshift's super is very much all in on supers that are arrays. But, I happen to want a super that is a map, as I'm sure a number of people do, and I would like to then ...
dlamblin's user avatar
  • 45.6k
1 vote
1 answer
63 views

I have the following procedure written in redshift, which uses 2 for loops to get country code first and then years as per the country codes. --Procedure : sp_for_loop_test create or replace procedure ...
MAK's user avatar
  • 7,355
0 votes
0 answers
66 views

I am trying to use for loop within the stored procedure to retrieve the employee id and process further but getting an error: Error: SQL Error: Internal jdbc driver error Procedure: create or replace ...
MAK's user avatar
  • 7,355
0 votes
0 answers
36 views

I'm trying to connect to Amazon Redshift using an AWS Identity Center (IdC) access token from a Java application via the Redshift JDBC driver. I’m using a machine-to-machine (M2M) setup (no browser-...
Maldanna Gk's user avatar
0 votes
0 answers
75 views

I'm using Power BI Desktop with Amazon Redshift in DirectQuery mode. Data loads initially (sometimes at least / sometimes it has errors), but when I scroll down in a visual (e.g., table), I eventually ...
merlin's user avatar
  • 1
0 votes
1 answer
84 views

I'm trying to use redshift_connector by AWS to connect to my Redshift cluster. To be able to connect, I first need to set up a proxy. Since redshift_connector doesn’t seem to have a dedicated ...
Martin Bedrna's user avatar
1 vote
1 answer
79 views

I’ve written a query that gives me what I’m looking for in Redshift, but I want to rewrite the query without using UNION ALL, the idea is to have a cumulative count over a profile_type annual and ...
icenature's user avatar
1 vote
1 answer
134 views

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....
Graziano Fuccio's user avatar
1 vote
0 answers
161 views

We are integrating Amazon Redshift with SQLAlchemy and found an incompatibility when moving from SQLAlchemy 1.4.x to 2.x. Problem When using SQLAlchemy 2.x, our Redshift connections fail with: ...
satanichinge's user avatar
1 vote
0 answers
156 views

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 ...
shiva's user avatar
  • 2,781
0 votes
2 answers
114 views

I am trying to create and run a lambda function from within Redshift. I have scaled the lambda_handler back to something very simple def lambda_handler(event, context): print("Received event:&...
Stephen Saidani's user avatar
1 vote
0 answers
30 views

I'm building DMS solution which pulls data from Azure SQL Server to Redshift. I'd like to limit the Trust Policy of the dms-access-for-endpoint role. All works fine with the basic setup, ie: { ...
aghhs's user avatar
  • 79
1 vote
0 answers
108 views

I have an employee table which has data for all region and countries. As an admin, I want to enable RLS on this table so that the end user can only view the data he is allowed to. The access ...
Alex's user avatar
  • 91
0 votes
0 answers
37 views

I have a table like this: total alert group_id hlevel full_path parent_id root_group_id 5100FFFF-60B6-D5CD-FCCD-A8A3E03F0000 1 BizA\DivA 5100FFFF-60B6-D5CD-BFBA-A8A3E03F0000 5100FFFF-60B6-D5CD-FCCD-...
gpkbz's user avatar
  • 1
1 vote
0 answers
23 views

I am selecting a list . select * from table where id in (3,1,2,4) Is there a way to force the same order in the output as it is shown in the select above?
Rostricalv's user avatar
0 votes
0 answers
86 views

I'm facing a weird issue while using redshift connector in my python service ( for communicating to a RedShift DB instance ). It's not a consistent behaviour. When the pod is newly created, I was not ...
Uni Acc's user avatar
0 votes
1 answer
94 views

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 ...
TobyStack's user avatar
  • 331
1 vote
1 answer
144 views

I created a dataset in Superset SQL Lab by joining 2 tables on session_id. SELECT * FROM t1.performance as perf INNER JOIN t1.test_session as session ON perf.session_id = session.session_id Now, to ...
Prakhar Sahu's user avatar
1 vote
1 answer
293 views

Similar to: [Amazon](500310) Invalid operation: column "INVC_RLS_LCTN " is of type integer but expression is of type character varying; In Redshift I have a view creates a long series of ...
Adam Comer's user avatar
1 vote
1 answer
55 views

Redshift's CRC32 function returns a string: SELECT CRC32('abc'); > 364b3fb7 while MySQL returns an integer: SELECT CRC32('abc'); > 891568578 From AWS docs: The CRC32 function returns an 8-...
Oğuzhan Akan's user avatar
0 votes
0 answers
131 views

I'm working with Amazon Redshift Spectrum and trying to follow the principle of least privilege by granting only the necessary access to users or roles. I attempted the following command: GRANT SELECT ...
Jeff A's user avatar
  • 649
2 votes
2 answers
97 views

Source data - table name temp: Source value ID A C123 111 B V123 111 A C456 222 B V456 222 I need to convert the column name source output as a new column header and store the column name value output ...
John Smith's user avatar
0 votes
2 answers
81 views

Following is my table. I want to sum across all different combinations and put the sum in separate columns, not in the same column. data: Subject Var1 Var2 Var3 Var4 Constant1 Constant2 ONE 1 2 1 1 A ...
user10969476's user avatar
0 votes
1 answer
41 views

Tried to store data into redshift table from spring boot. Got an error because of the auto increment ID column. Below is the code and error. Entity class @Entity @Data @Table(name = "...
Jeeva D's user avatar
  • 374
0 votes
2 answers
67 views

In redshift I have data in a super type column roles like {"foo":true, "foo/bar":true} I can query for foo like WHERE roles.foo = true I cannot work out how to escape to query ...
GC30's user avatar
  • 45
0 votes
2 answers
130 views

Attempting to join one table (Table a) with a string (field fruit) against another table (Table b) with a list of comma separated strings (field all_fruits) as the join condition. I want to return ...
Jammy's user avatar
  • 423
0 votes
2 answers
65 views

I am trying to get Liquibase set up so that it can manage changes to a Redshift database. I have the Liquibase Redshift extension working and am using the Redshift JDBC driver. When I run the update ...
dhillis's user avatar
  • 106
0 votes
1 answer
37 views

I have a publicly accessible Redshift cluster in two public subnets with public ips and an IGW attached. Its security group allows access on port 5439 from my own IP and from within another sg. Inside ...
paul445's user avatar
  • 71
-2 votes
1 answer
59 views

I have a time column: metric_date Start_time 2025-04-28 14:30 2025-04-28 1:4 0 But I want the output to be this metric_date Start_time Start_date 2025-04-28 14:30 2025-04-28 14:30:00 2025-04-28 1:4 0 ...
Naomi 's user avatar
  • 31
1 vote
1 answer
133 views

Since AWS Redshift doesn't support native table partitioning, I implemented what in some places is called "manual partitioning" (eg.: here); in short: Instead of creating a big time-series ...
msabba's user avatar
  • 23
1 vote
1 answer
46 views

I am trying to load blank values as blank and null values as null from a CSV using COPY command in Redshift. But I see that when I use Data Conversion Parameters like EMPTYASNULL it loads both blanks ...
Aditya Bhat's user avatar
0 votes
0 answers
86 views

I have created a redshift API that my front-end users can use to query the database. For security reasons, The system adds the word Select into before the query returned by user so only select ...
Muhammad Abdullah's user avatar
-1 votes
2 answers
52 views

I was going through dynamo DB scan operation and was wondering how it would be different from performing query operation on redshift. A filter expression is applied after a Scan finishes but before ...
Sourav gupta's user avatar
0 votes
0 answers
52 views

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 ...
inet123's user avatar
  • 812
1 vote
2 answers
116 views

I'm trying to use recursive CTE in Tableau. I reazlized this doesn't work when running custom SQL, but I can create a temp table CREATE TEMP TABLE temp_table as WITH RECURSIVE missing_dates_cte (...
jp207's user avatar
  • 194
0 votes
0 answers
223 views

Error: BrokenPipe: server socket closed. Please check that client side networking configurations such as Proxies, firewalls, VPN, etc. are not affecting your network connection. DBT newbie here. ...
AIViz's user avatar
  • 102
0 votes
2 answers
151 views

I have data stored in s3 with parquet format, and have multiple column with array of struct and also array inside array of struct Here I am query one category column which have array of struct Sample ...
Nishant Dixit's user avatar
-5 votes
1 answer
69 views

Considering following test data: CREATE TABLE products_su ( country varchar(2), intprd varchar(20), period date, su int ); INSERT INTO products_su (country, intprd, "period&...
Kondjitsu's user avatar
0 votes
2 answers
89 views

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 ...
Josedc8's user avatar
0 votes
1 answer
113 views

I am creating a table in Redshift Serverless using Zero_ETL from DynamoDB and then creating a materialised view for use by a BI Dashboard, with the intention that the connection can only access the MV....
Matt's user avatar
  • 31
1 vote
2 answers
122 views

I'm seeking help with including deeper recurrence then last row with recursive query. Source data: CREATE TABLE products_su(country, intprd, "period", su)AS VALUES ('GL', 'Medicine', '2019-...
Kondjitsu's user avatar
0 votes
0 answers
33 views

A lambda that DELETEs and COPYs 8 parquet files from S3 into 8 Redshift tables (using boto3). Each table is created from a single file, each with less than 3K rows. 7 of the queries take 2-3 seconds ...
CodeMonkey74's user avatar
0 votes
0 answers
131 views

I am trying to run a select statement in Amazon Redshift on a table in my AWS Data Catalog. The AWS Data Catalog database was created by a crawler connecting to an external Oracle database. I get the ...
John's user avatar
  • 3
0 votes
1 answer
163 views

I’m following this AWS Redsfhit documentation to create a stored procedure that returns a result set using a cursor, but I keep getting the following error: Number of cells in the row (0) does not ...
Lior Inerman's user avatar
2 votes
2 answers
78 views

In a table, I have plan details of customers with their customer_id and enroll_date. Now, I want to identify duplicate and valid enrollments from the overall data. Duplicate: If a customer enrolls a ...
Lakshmi Sruthi K's user avatar
0 votes
1 answer
148 views

I am receiving intermittent Serializable isolation violation on xid errors from a stored proc in Redshift so I followed the guidance in the aws docs (https://docs.aws.amazon.com/redshift/latest/dg/...
danrockcoll's user avatar
0 votes
1 answer
74 views

I want to extract only val2 from the below column1 of a table, I'm not sure how to do it with SQL though I've tried with regexp_subtr/instr, the length of column values are dynamic but the contents of ...
Raven Smith's user avatar
0 votes
0 answers
20 views

I have to reference the view created in the database b from database c. Note: I have created a table created in database a. Consider this is my scenario, I have created a table in database a, and a ...
vinoth kumar's user avatar

1
2 3 4 5
176