data_cells_filters
Creates, updates, deletes or gets a data_cells_filter
resource or lists data_cells_filters
in a region
Overview
Name | data_cells_filters |
Type | Resource |
Description | A resource schema representing a Lake Formation Data Cells Filter. |
Id | aws.lakeformation.data_cells_filters |
Fields
Name | Datatype | Description |
---|---|---|
table_catalog_id | string | The Catalog Id of the Table on which to create a Data Cells Filter. |
database_name | string | The name of the Database that the Table resides in. |
table_name | string | The name of the Table to create a Data Cells Filter for. |
name | string | The desired name of the Data Cells Filter. |
row_filter | object | An object representing the Data Cells Filter's Row Filter. Either a Filter Expression or a Wildcard is required |
column_names | array | A list of columns to be included in this Data Cells Filter. |
column_wildcard | object | An object representing the Data Cells Filter's Columns. Either Column Names or a Wildcard is required |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | TableCatalogId, DatabaseName, TableName, Name, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all data_cells_filters
in a region.
SELECT
region,
table_catalog_id,
database_name,
table_name,
name,
row_filter,
column_names,
column_wildcard
FROM aws.lakeformation.data_cells_filters
WHERE region = 'us-east-1';
Gets all properties from an individual data_cells_filter
.
SELECT
region,
table_catalog_id,
database_name,
table_name,
name,
row_filter,
column_names,
column_wildcard
FROM aws.lakeformation.data_cells_filters
WHERE region = 'us-east-1' AND data__Identifier = '<TableCatalogId>|<DatabaseName>|<TableName>|<Name>';
INSERT
example
Use the following StackQL query and manifest file to create a new data_cells_filter
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lakeformation.data_cells_filters (
TableCatalogId,
DatabaseName,
TableName,
Name,
region
)
SELECT
'{{ TableCatalogId }}',
'{{ DatabaseName }}',
'{{ TableName }}',
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lakeformation.data_cells_filters (
TableCatalogId,
DatabaseName,
TableName,
Name,
RowFilter,
ColumnNames,
ColumnWildcard,
region
)
SELECT
'{{ TableCatalogId }}',
'{{ DatabaseName }}',
'{{ TableName }}',
'{{ Name }}',
'{{ RowFilter }}',
'{{ ColumnNames }}',
'{{ ColumnWildcard }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: data_cells_filter
props:
- name: TableCatalogId
value: '{{ TableCatalogId }}'
- name: DatabaseName
value: '{{ DatabaseName }}'
- name: TableName
value: null
- name: Name
value: null
- name: RowFilter
value:
FilterExpression: '{{ FilterExpression }}'
AllRowsWildcard: {}
- name: ColumnNames
value:
- null
- name: ColumnWildcard
value:
ExcludedColumnNames: null
DELETE
example
/*+ delete */
DELETE FROM aws.lakeformation.data_cells_filters
WHERE data__Identifier = '<TableCatalogId|DatabaseName|TableName|Name>'
AND region = 'us-east-1';
Permissions
To operate on the data_cells_filters
resource, the following permissions are required:
Create
lakeformation:CreateDataCellsFilter,
glue:GetTable
Delete
lakeformation:DeleteDataCellsFilter
Read
lakeformation:ListDataCellsFilter
List
lakeformation:ListDataCellsFilter