Questions tagged [amazon-redshift]
Amazon Redshift is a petabyte-scale data warehousing service using existing business intelligence tools to analyze the data. Redshift is a column-oriented MPP database based on ParAccel and ParAccel was itself based on PostgreSQL.
amazon-redshift
8,758
questions
0
votes
0
answers
11
views
dbt doc block automation with regex in VSCode
I am trying to automate creating dbt doc blocks in markdown file. My issue is when I have more than one model with their own fields, I'm not sure how to automate doc block creation.
So far I have this:...
0
votes
0
answers
9
views
Getting ERROR: XX000: Materialized view could not be created on redshift
I encountered an error while trying to recreate a view with the same name after dropping the current one:
SQL Error [XX000]: ERROR: Materialized view could not be created.
Interestingly, if I change ...
0
votes
1
answer
17
views
Redshift COPY with JSON PATH Case Sensitivity
I want to copy a file from S3 to Redshift. Content is in camelCase:
{"accountId":{"S:"1acb4"}}
Redshift columns are in all lowercase. This is marshalled Dynamo JSON, so I am ...
0
votes
1
answer
11
views
Error calling Redshift stored procedure with refcursor parameter
I am trying to fetch resultset in DataGrip console from a Redshift stored procedure. Here is my stored procedure body
CREATE OR REPLACE PROCEDURE test_schema.get_redshift_table_ddl(
p_schema_name ...
0
votes
0
answers
15
views
Connecting to Redshift server in SAS
The data management people in my company (who are not SAS users) have sent me information to connect to one of our Redshift servers:
User ID: user
Password: pwd
Database Server: svr123
Database Port: ...
0
votes
3
answers
49
views
Using nested lag or any other window function
I am working on a transaction dataset with one date column & one identifier column. Now retroactively I want to create a boolean column to check whether any particular activity (e.g. marketing ...
0
votes
0
answers
31
views
Need help to generate records with 6 months cycles dates into table [closed]
I need to create 10 entries( six month gap into redshift) into table like below.
Week_start_date Week_end_date
2024-01-01 2024-06-30(current_date)
2023-07-01 2023-12-31
2023-01-01 2023-...
1
vote
1
answer
64
views
change column names using a dbt macro
Can I use a dbt macro to modify the column names in AWS redshift?
Example changes to be made:
"checkedAt" --> checked_at
"helloWorld" --> hello_world
"testKitchenNew&...
0
votes
0
answers
13
views
AWS Redshift auto_mv parameter is enabled, but there are no materialized views
I work with a Redshift cluster that receives a lot of routine queries that could be turned into materialized views. I thought enabling auto_mv = true would create materialized views of these queries, ...
0
votes
3
answers
55
views
AWS Redshift SQL - How to check if a Json object has values in it?
1/ I am using SQL on AWS and trying to detect quickly when a Json object has key-value in it. Anyone knows it? Thanks
For example:
A. {"context":{"abc":"123"} --> Yes
...
0
votes
0
answers
9
views
How do I get the list of columns in local tables and tables that are datashares in Redshift?
Per aws documentation (https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_REDSHIFT_COLUMNS.html), SVV_REDSHIFT_COLUMNS is the table to use but it is extremely slow if I have to retrieve all columns ...
3
votes
0
answers
38
views
Getting : "An error occurred while calling o110.pyWriteDynamicFrame. Exception thrown in awaitResult:" in AWS Glue Job
I am getting "An error occurred while calling o110.pyWriteDynamicFrame. Exception is thrown in awaitResult:" in AWS Glue Job.
The size of my source data in s3 is around 60 GB.
I am reading ...
5
votes
1
answer
91
views
How do I connect R to a Redshift database on Apple M3?
Intro and System
I am trying to access a Redshift database from R. I am on an Apple M3 Pro machine on Sonoma 14.5. I have R version 4.4.1. I am expecting to give the database name (e.g., "dev&...
0
votes
2
answers
32
views
Amazon Redshift takes forever to Vacuum
Recently, the vacuum; command takes forever to complete. It was working before but since 3 weeks ago, it never finishes. I increased the timeout to 8 hours but it still times out! It used to finish in ...
0
votes
2
answers
32
views
Database specific user in AWS Redshift
I've created 2 databases in Redshift engine:
database_production
database_development
Each database have 2 schemas: public and custom.
I want to create user called developer who has all privileges ...