Appends raw data to the end of the output LOB associated with a specified output locator. Returns a status code.
Syntax
tdr.LobAppend( locator, data)
Syntax Elements
- locator
- Parameter type: integer
The output locator returned by the tdr.LobCol2Loc function.
- data
- Parameter type: raw
A vector with raw data to be appended to the output LOB.
Usage Notes
Before you call this function, you must call the tdr.LobCol2Loc function to get the output locator for the LOB where the data will be appended.
This function is valid only if called from the table operator.
An error is raised if the function is called from the contract function.
Example: Store an R Data Structure as a LOB in a Table
This example shows how an R data structure can be stored as a LOB in a table with two attributes: (int, blob):
- Call the glm R function to compute a model and return an R data structure.
- Serialize the data structure.
- Store the data structure in the second column of the current output row.
lin_model <- glm(cc_rev ~ income + age + avg_ck_bal + avg_sv_bal, data = training) slin_model <- serialize( lin_model, NULL ) loc <- tdr.LobCol2Loc(0,1) return_value <- tdr.LobAppend (loc, slin_model)