Teradata Package for R Function Reference | 17.00 - 17.00 - PathGenerator - Teradata Package for R

Teradata® Package for R Function Reference

Teradata Package for R
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)


The PathGenerator function takes a set of paths and outputs the sequence and all possible subsequences, which can be input to the function PathSummarizer (td_path_summarizer_mle).


  td_path_generator_mle (
      data = NULL,
      seq.column = NULL,
      delimiter = ",",
      data.sequence.column = NULL,
      data.order.column = NULL



Required Argument.
Specifies the name of the tbl_teradata containing the input data.


Optional Argument.
Specifies Order By columns for "data".
Values to this argument can be provided as a vector, if multiple columns are used for ordering.
Types: character OR vector of Strings (character)


Required Argument.
Specifies the name of the input tbl_teradata column that contains the paths.
Types: character


Optional Argument.
Specifies the single-character delimiter that separates symbols in the path string.
Note: Do not use any of the following characters as delimiter (they cause the function to fail): Asterisk (*), Plus (+), Left parenthesis ((), Right parenthesis ()), Single quotation mark ('), Escaped single quotation mark (\'), Backslash (\).
Default Value: ","
Types: character


Optional Argument.
Specifies the vector of column(s) that uniquely identifies each row of the input argument "data". The argument is used to ensure deterministic results for functions which produce results that vary from run to run.
Types: character OR vector of Strings (character)


Function returns an object of class "td_path_generator_mle" which is a named list containing object of class "tbl_teradata".
Named list member can be referenced directly with the "$" operator using the name: result.


    # Get the current context/connection
    con <- td_get_context()$connection
    # Load example data.
    loadExampleData("pathgenerator_example", "clickstream1")
    # Create remote tibble objects.
    # The table contains clickstream data, where the "path" column
    # contains symbols for the pages that the customer clicked
    clickstream1 <- tbl(con, "clickstream1")
    # Generate path sequences and count for the given clickstream data
    td_path_generator_out <- td_path_generator_mle(data = clickstream1,
                                               seq.column = "path"