AppLib REMOTE ROWS
From LucidDB Wiki
(Redirected from LucidDbAppLib REMOTE ROWS)
Contents |
Syntax
FROM TABLE( APPLIB.REMOTE_ROWS ( row_format_cursor, port, is_compressed ) )
Purpose
Allow serialized rows to be streamed via HTTP from remote Java applications (PDI / Talend).
Input
- row_format_cursor [CURSOR]: A cursor that contains the row format of the rows that will arrive. The cursor rows are discarded (not used) but metadata (column names, datatypes) are inspected to determine the format of the remote rows arriving
- port [INT]: The port which LucidDb will begin listening for rows on.
- is_compressed [BOOLEAN]: Whether the input stream is GZip compressed.
Output
- UDX Table - returns a UDX Table of the same format (number of columns, datatypes, and names) as row_format_cursor with rows values that were received from the remote source.
Example
SELECT ID, NAME from
TABLE(
APPLIB.REMOTE_ROWS(
CURSOR(
select cast(null as int) as id, cast(null as varchar(128)) as name
from (values(0))
)
,90
,false
)
)
RETURNS:
Assumes remote source sent 3 Java Arrays with values Array1: 1 / String1 Array2: 2 / String2 Array3: 3 / String3 Array4: empty
ID NAME
1 String1
2 String2
3 String3
Outstanding Questions?
Anything necessary in the specification to enable error handling? Performance? Should we just close stream? Or send some sort of trailing report?
See Also
- LucidDbPDIStreamingLoader
- LucidDbUtilityRowSerialization
- Reading (LucidDbAppLib_READ_ROWS_FROM_FILE) and Writing (LucidDbAppLib_WRITE_ROWS_TO_FILE) via files.