Hi,
I have tested creation of a RLS dataset in a Redshift table through CLI and it works.
Json definition of the rls dataset (RelationalTable approach ) :
The table has 3 columns ( username , product_category, cc_name ) , the Logicaltablemap with project operation only consists of columns I require ( username , product_category ) .
Note : Without LogicalTableMap>ProjectedColumns , it will bring all the columns in the table.
{
"AwsAccountId": "123456789012",
"DataSetId": "user_product_category_rls_mv_cli",
"Name": "user_product_category_rls_mv_cli",
"PhysicalTableMap": {
"user-product-categoryrls-mv-cli": {
"RelationalTable": {
"DataSourceArn": "arn:aws:quicksight:eu-central-1:123456789012:datasource/5bc02bef-e0d7-4d89-8092-3b3e6fca8b64",
"Schema": "public",
"Name": "user_product_category_rls_mv",
"InputColumns": [{
"Name": "username",
"Type": "STRING"
},
{
"Name": "product_category",
"Type": "STRING"
},
{
"Name": "cc_name",
"Type": "STRING"
}
]
}
}
},
"LogicalTableMap": {
"user-product-category-rls-mv-cli-logical": {
"Alias": "user-product-category-rls-mv-cli-logical",
"DataTransforms": [{
"ProjectOperation": {
"ProjectedColumns": [
"username", "product_category"
]
}
}],
"Source": {
"PhysicalTableId": "user-product-categoryrls-mv-cli"
}
}
},
"ImportMode": "DIRECT_QUERY",
"Permissions": [{
"Principal": "arn:aws:quicksight:eu-central-1:123456789012:user/default/Admin-OneClick/xxxxx-Isengard",
"Actions": [
"quicksight:CreateIngestion",
"quicksight:PassDataSet",
"quicksight:DescribeIngestion",
"quicksight:UpdateDataSet",
"quicksight:DeleteDataSet",
"quicksight:DescribeDataSet",
"quicksight:CancelIngestion",
"quicksight:ListIngestions",
"quicksight:DescribeDataSetPermissions",
"quicksight:UpdateDataSetPermissions"
]
}],
"DataSetUsageConfiguration": {
"DisableUseAsDirectQuerySource": true,
"DisableUseAsImportedSource": true
}
}
Data Preparation showing only the required columns :
In custom sql , you are specifying the required columns which has the same effect .