8,792 questions
0
votes
0
answers
13
views
boto3 redshift client .describe_statement provides no error message
I've run an sql query through boto3 redshift client's execute_statement function, and subsequently checked the status of the query with describe_statement.
result = client_redshift.execute_statement(...
0
votes
0
answers
41
views
Redshift COPY query hangs. (Running but not submitted) (Table size just 30 rows)
I have been running COPY commands on Redshift in query editor and boto3 (programatically), successfully.
However, after yesterday, neither method works.
Although, cluster console shows that query is ...
0
votes
0
answers
23
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 ...
0
votes
0
answers
21
views
Create table from another table, but only the primary column
From a table, how can I create another table without the data and with only the primary key columns?
I am able to get the primary key columns using the following query:
SELECT column_name
FROM ...
1
vote
2
answers
39
views
fill gaps in outer join in redshift
I have a table that contains products and sales data. Unfortunately, not every month a given product was sold, and I would like unsold products in a given month to also be shown. In Oracle, the query ...
0
votes
2
answers
102
views
Unable to create AWS Glue Connection to RedShift Serverless
I am trying to create a connection between AWS Glue and the Redshift database in Glue. Currently, I am getting an error:
Connection creation is failed.
Create connection failed during validating ...
1
vote
1
answer
75
views
Is there a SQL feature to return the max value for every column?
Background: I have a unique setup with multiple tables, each with circa 1,600 columns, which I am trying to clean up (it creates benefits upstream). I know that around 80% of these columns will always ...
0
votes
1
answer
30
views
in GA4,the daily exported events are about to exceed 1 million. What should I do next?
I am using the Daily Export method to export some GA events to BigQuery, but the daily event volume is about to exceed 1 million. If I switch to the Streaming method, I might lose information such as ...
-1
votes
0
answers
48
views
Seeking Advice on Reducing Redshift Snapshot Costs [closed]
I'm decommissioning my Amazon Redshift cluster due to high costs. It was running on 4 ra3.xlplus nodes, and the snapshot size is 225TB. I've already paused the cluster to save on compute costs, but I ...
0
votes
1
answer
27
views
How to Extract Nested JSON Array in Redshift and Create a Table with Specific Columns?
I have a table in AWS Redshift with a column called json, which stores a nested JSON object as a string. I need to create a new table with three columns: sid, skill_name, and skill_vdd. The json ...
0
votes
1
answer
34
views
Amazon QuickSight | Recursive CTE in subquery are not supported
I would like to use a recursive CTE to generate a series of dates. I am using this CTE to cross join onto locations to generate a mapping table as a CTE where each location has a row for each date. ...
0
votes
0
answers
29
views
updating the two dimesional data in sql redshift
so lets say i have two tables inventory and demand.
both contains 3 keys location , matrial and yr_wk.
inv contains onhand and demand contains demand quantity.
INV data : location , matrial , yr_wk, ...
1
vote
0
answers
43
views
Datashare writes are not authorized by producer or associated by consumer
I am trying to query a datashare from AWS Data Exchange using Redshift in Python. This datashare, to be precise.
This is how I am attempting to run my Python code:
import os
import psycopg
os.environ[...
0
votes
1
answer
49
views
How to count from 0 and onward for every new ID?
I constructed the following query and it gives me the following output...
with tb1 as
(
select id
,row_number() over(order by id)-1 as lag_0
from id_store
),
tb2 as
(
select *
...
0
votes
1
answer
50
views
Recursive SQL not returning full scope of data
I have a logic to calculate number of patients and med dosage per period, however my redhsift recursive SQL is not returning full scope of data:
WITH recursive build (period_start_date, peq, prev_peq, ...