awswrangler.quicksight.create_athena_data_source¶
- awswrangler.quicksight.create_athena_data_source(name: str, workgroup: str = 'primary', allowed_to_use: List[str] | _QuicksightPrincipalList | None = None, allowed_to_manage: List[str] | _QuicksightPrincipalList | None = None, tags: dict[str, str] | None = None, account_id: str | None = None, boto3_session: Session | None = None, namespace: str = 'default') None ¶
Create a QuickSight data source pointing to an Athena/Workgroup.
Note
You will not be able to see the the data source in the console if you not pass your user to one of the
allowed_*
arguments.- Parameters:
name (str) – Data source name.
workgroup (str) – Athena workgroup.
tags (Dict[str, str], optional) – Key/Value collection to put on the Cluster. e.g.
`{"foo": "boo", "bar": "xoo"})`
allowed_to_use (dict["users" | "groups", list[str]], optional) – Dictionary containing usernames and groups that will be allowed to see and use the data. e.g.
`{"users": ["john", "Mary"], "groups": ["engineering", "customers"]}`
Alternatively, if a list of string is passed, it will be interpreted as a list of usernames only.allowed_to_manage (dict["users" | "groups", list[str]], optional) – Dictionary containing usernames and groups that will be allowed to see, use, update and delete the data source. e.g.
`{"users": ["Mary"], "groups": ["engineering"]}`
Alternatively, if a list of string is passed, it will be interpreted as a list of usernames only.account_id (str, optional) – If None, the account ID will be inferred from your boto3 session.
boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.
namespace (str) – The namespace. Currently, you should set this to default.
- Returns:
None.
- Return type:
None
Examples
>>> import awswrangler as wr >>> wr.quicksight.create_athena_data_source( ... name="...", ... allowed_to_manage=["john"] ... )