Questions tagged with Database

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Athena engine v3, errors in VIEW with UNNEST

It seems that recent version of Athena engine (v3) has severe inconsistency with UNNEST ARRAY of structs. Moreover, it was not documented among breaking changes at https://docs.aws.amazon.com/athena/latest/ug/engine-versions-reference-0003.html. To reproduce: ``` WITH dataset AS ( SELECT ARRAY[ CAST(ROW('Bob', 38) AS ROW(name VARCHAR, age INTEGER)), CAST(ROW('Alice', 35) AS ROW(name VARCHAR, age INTEGER)), CAST(ROW('Jane', 27) AS ROW(name VARCHAR, age INTEGER)) ] AS users ) SELECT t.* FROM dataset CROSS JOIN UNNEST(users) t(s); -- OK ``` ``` CREATE OR REPLACE VIEW v_test AS WITH dataset AS ( SELECT ARRAY[ CAST(ROW('Bob', 38) AS ROW(name VARCHAR, age INTEGER)), CAST(ROW('Alice', 35) AS ROW(name VARCHAR, age INTEGER)), CAST(ROW('Jane', 27) AS ROW(name VARCHAR, age INTEGER)) ] AS users ) SELECT t.* FROM dataset CROSS JOIN UNNEST(users) t(s); -- line 9:36: Column alias list has 1 entries but 't' has 2 columns available ``` ``` CREATE OR REPLACE VIEW v_test AS WITH dataset AS ( SELECT ARRAY[ CAST(ROW('Bob', 38) AS ROW(name VARCHAR, age INTEGER)), CAST(ROW('Alice', 35) AS ROW(name VARCHAR, age INTEGER)), CAST(ROW('Jane', 27) AS ROW(name VARCHAR, age INTEGER)) ] AS users ) SELECT t.* FROM dataset CROSS JOIN UNNEST(users) t(name,age); -- OK ``` ``` select * from v_test -- INVALID_VIEW: line 1:15: Failed analyzing stored view: line 9:12: Column alias list has 2 entries but 't' has 1 columns available ``` As opposite to that, in Athena engine v2 , the "single column syntax" `t(s)` works consistently in both CREATE VIEW, SELECT FROM VIEW and immediate SELECT. In current Trino (v. 402), the "multiple column syntax" ` t(name,age)` works consistently in both CREATE VIEW, SELECT FROM VIEW and immediate SELECT. These errors prevent us to migrate to Athena engine v3. How could it be solved? Thank you in advance
1
answers
0
votes
97
views
asked a month ago

Multi-AZ DB Cluster Parameter Group Updating Not Working

**Note: Aurora Clusters are not the same as Multi-AZ DB Clusters. In my situation I am not using Aurora.** I have been having no success trying the change my Multi-AZ DB Cluster parameter group in the region N. Virginia, so I decided to give it a try in the Ohio region. What I noticed is a difference in the UI for inspecting a writer/reader node in the cluster. **Virginia Region:** ![Shows writer node with default parameter group](/media/postImages/original/IMPYG6M9PoR0GiWOLavo39OQ) **Ohio Region:** ![Shows writer node without displaying parameter group](/media/postImages/original/IMYvSfIMA5RmyB0gJKP9C95w) This difference in UI between the regions is strange and I feel it may be some sort of bug. With Multi-AZ DB Clusters the writer/reader nodes are supposed to get their parameter group configuration from the "cluster" and so not showing it in the Ohio version makes sense because it's based on the cluster. The Virginia version is showing the writer/reader parameter group as if it IS the cluster node (by displaying way more information than the Ohio region version). This doesn't make sense and even when I do change the cluster's parameter group when modifying the cluster itself, the writer/reader nodes DO NOT change their parameter group. They stay the same using the default: default:mysql-8-0. Even creating the cluster with a custom parameter group from the very beginning, the writer/reader nodes do no accept it, they keep: default:mysql-8-0. This is very confusing and not in-line with what the documentation describes when dealing with this functionality.
1
answers
0
votes
11
views
asked a month ago