Skip to content

Use USER_NAME instead of FULL_NAME of the filter for Users in the AI Cost Dashboard #3456

Description

@sfc-gh-rahagrawal

Suggest to use USER_NAME instead of FULL_NAME in the dropdown for user in the AI Cost Dashboard.

This helps prevent duplicates when the same FULL_NAME is used with different USER_NAME.
This happened with one of our customers where they use multiple environment in the same account. A user has both the test as well as prod account and uses the same name. The AI Cost Dashboard shows only partial information when filtered on user

https://github.com/Snowflake-Labs/sfquickstarts/blob/master/site/sfguides/src/ai-cost-dashboard/assets/streamlit_app.py
user_map = dict(zip(user_summary_df["FULL_NAME"], user_summary_df["USER_NAME"]))
all_users = ["All Users"] + sorted(user_summary_df["FULL_NAME"].dropna().unique().tolist())

can be adapted to

user_map = dict(zip(user_summary_df["FULL_NAME"], user_summary_df["USER_NAME"]))
all_users = ["All Users"] + sorted(user_summary_df["USER_NAME"].dropna().unique().tolist())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions