GetFutileColumns
Description
td_get_futile_columns_sqle()
function returns the futile column names
if either of the conditions is met:
If all the values in the columns are unique
If all the values in the columns are the same
If the count of distinct values in the columns divided by the count of the total number of rows in the input data is greater than or equal to the threshold value
Notes:
This function requires the UTF8 client character set for UNICODE data.
This function does not support Pass Through Characters (PTCs). For information about PTCs, see Teradata Vantage™ - Advanced SQL Engine International Character Set Support.
This function does not support KanjiSJIS or Graphic data types.
This function works only for categorical data.
Usage
td_get_futile_columns_sqle (
data = NULL,
object = NULL,
category.summary.column = NULL,
threshold.value = NULL,
...
)
Arguments
data |
Required Argument. |
object |
Required Argument. |
category.summary.column |
Required Argument. |
threshold.value |
Required Argument. |
... |
Specifies the generic keyword arguments SQLE functions accept. Below
are the generic keyword arguments: volatile: Function allows the user to partition, hash, order or local order the input data. These generic arguments are available for each argument that accepts tbl_teradata as input and can be accessed as:
Note: |
Value
Function returns an object of class "td_get_futile_columns_sqle"
which is a named list containing object of class "tbl_teradata".
Named list member(s) can be referenced directly with the "$" operator
using the name(s):result
Examples
# Get the current context/connection.
con <- td_get_context()$connection
# Load the example data.
loadExampleData("tdplyr_example", "titanic")
# Create tbl_teradata object.
titanic <- tbl(con, "titanic")
# Check the list of available analytic functions.
display_analytic_functions()
# Example 1 : Get futiles columns from target columns 'cabin', 'sex', and 'ticket'.
categoricalsummary_out <- td_categorical_summary_sqle(data=titanic,
target.columns=
c("cabin", "sex",
"ticket"))
getfutilecolumns_out <- td_get_futile_columns_sqle(
data=titanic,
object=categoricalsummary_out$result,
category.summary.column="ColumnName",
threshold.value=0.7)
# Print the result.
print(getfutilecolumns_out$result)