ReadFileAsString

Summary

The ReadFileAsString function reads a file located on Connect’s SFTP file system and returns the entire contents of the file as a single string column and row. The source file must be less than 4 megabytes in size.

Syntax

ReadFileAsString(FilePath=<path to file>);

Return Type

String

Details

This function is a table function that returns an entire file as a single string value in one column and one row. Conversely, the ReadFile command queries the CSV as a database table, returning the number of columns and rows found in the source CSV.

Examples

set v_file_in_a_string *= ReadFileAsString(FilePath='/training_lab/source_staging_order.csv');

eval v_file_in_a_string;

readfileasstring_01

Related Functions

ReadFile

WriteFile