loadRecord#

swordfish.function.loadRecord()#

Load a binary file with fixed length for each column into memory.

Parameters:
  • filename (Constant) – A string indicating the path of a file.

  • schema (Constant) – A tuple of vectors. Each vector of the tuple represents the name and data type of a column. For a string column, we also need to specify the length of the string. If a string is shorter than the specified length, add 0s in the end to reach the specified length.

  • skipBytes (Constant) – A nonnegative integer indicating the number of bytes to skip in the beginning of the file. The default value is 0.

  • count (Constant) – A positive integer indicating the number of records to load. If it is not specified, load all records.