Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed inconsistency when creating account_map view #487

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

dnabic-aws
Copy link
Contributor

@dnabic-aws dnabic-aws commented Feb 21, 2023

Description of changes:

  • Changes related to creation of account_map from cid-cmd
    • SQL query for creation of view account_map as organization is moved from code into file cid/builtin/core/data/queries/shared/account_map_org.sql
    • Column names for view account_map are the same when this view is created as dummy and as organization
    • account_email_id column name is removed as it is not used anywhere

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dnabic-aws dnabic-aws changed the title [WIP] align account_map created as dummy and as organization [WIP] fixing inconsistency when creating account_map view Feb 21, 2023
@dnabic-aws dnabic-aws changed the title [WIP] fixing inconsistency when creating account_map view Fixed inconsistency when creating account_map view Mar 1, 2023
* added missing closing bracket in query in file account_map.sql
@@ -1,10 +1,12 @@
CREATE OR REPLACE VIEW account_map AS
SELECT
${account_id} AS account_id,
MAX_BY(${account_name}, concat(${account_name}, ': ', ${account_id}) AS account_name
FROM
MAX_BY(${account_name}, concat(${account_name}, ': ', ${account_id})) AS account_name,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is fixed missing closing bracket. Without fix, dashboard deployment will crash.

@jannyg
Copy link
Contributor

jannyg commented Feb 28, 2024

This PR seems stale? I ran into this issue when using the cid-cmd map --account-map-source to create mappings from CSV. Had to update views and datasets because of errors.

@iakov-aws
Copy link
Collaborator

This PR seems stale? I ran into this issue when using the cid-cmd map --account-map-source to create mappings from CSV. Had to update views and datasets because of errors.

Hi Please can you provide more info regarding your issue? This PR was not compatible with update procedure so we put it on hold.

@jannyg
Copy link
Contributor

jannyg commented Feb 29, 2024

This PR seems stale? I ran into this issue when using the cid-cmd map --account-map-source to create mappings from CSV. Had to update views and datasets because of errors.

Hi Please can you provide more info regarding your issue? This PR was not compatible with update procedure so we put it on hold.

I'm new to CUDOS and QuickSight so I'll try to explain as good as I can :)

After running the command (installed latest with pip) on CUDOS v0.2.46 the datasets in QuickSight failed with column errors (account_email_id not found) or STALE (mismatch between number of columns).

[Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. COLUMN_NOT_FOUND: line 12:227: Column 'account_email_id' cannot be resolved or requester is not authorized to access requested resources [Execution ID: 3e3864e5-59cf-44ec-a837-dff9c7a792fe]

I had to manually update all the views in Athena and refresh and publish the datasets in QuickSight to resolve the issue. I also have some NULL values in the dashboard. It seems like there could be some accounts maybe missing, so I will check that first. But I was expecting the behavior for mapping to show account number if no account_name was found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants