Pack
Description
The td_pack_sqle()
function packs data from multiple input tbl_teradata columns into a single column.
Usage
td_pack_sqle (
data = NULL,
input.columns = NULL,
output.column = NULL,
delimiter = ",",
include.column.name = TRUE,
col.cast = FALSE,
accumulate = NULL,
...
)
Arguments
data |
Required Argument. |
input.columns |
Optional Argument. |
output.column |
Required Argument. |
delimiter |
Optional Argument. |
include.column.name |
Optional Argument. |
col.cast |
Optional Argument. |
accumulate |
Optional Argument. |
... |
Specifies the generic keyword arguments SQLE functions accept. 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_pack_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("pack_example", "ville_temperature")
# Create tbl_teradata object.
ville_temperature <- tbl(con, "ville_temperature")
# Check the list of available analytic functions.
display_analytic_functions()
# Example 1: Packs data from multiple input tbl_teradata columns
# into a single column.
obj <- td_pack_sqle(data=ville_temperature,
input.columns=c('city','state','period','temp_f'),
output.column='packed_data',
delimiter=',',
accumulate='city',
include.column.name=TRUE)
# Print the result.
print(obj$result)