NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
#include <CSVParser.hpp>
Public Member Functions | |
CSVParser (uint64_t numberOfSchemaFields, std::vector< NES::PhysicalTypePtr > physicalTypes, std::string delimiter) | |
public constructor for CSV input data parser More... | |
bool | writeInputTupleToTupleBuffer (std::string_view csvInput, uint64_t tupleCount, Runtime::MemoryLayouts::TestTupleBuffer &tupleBuffer, const SchemaPtr &schema, const Runtime::BufferManagerPtr &bufferManager) override |
takes csv string line as input, casts its values to the correct types and writes it to the TupleBuffer More... | |
![]() | |
Parser (std::vector< PhysicalTypePtr > physicalTypes) | |
public constructor for input data parser More... | |
virtual | ~Parser ()=default |
void | writeFieldValueToTupleBuffer (std::string value, uint64_t schemaFieldIndex, Runtime::MemoryLayouts::TestTupleBuffer &tupleBuffer, const SchemaPtr &schema, uint64_t tupleCount, const Runtime::BufferManagerPtr &bufferManager) |
casts a value in string format to the correct type and writes it to the TupleBuffer More... | |
NES::CSVParser::CSVParser | ( | uint64_t | numberOfSchemaFields, |
std::vector< NES::PhysicalTypePtr > | physicalTypes, | ||
std::string | delimiter | ||
) |
public constructor for CSV input data parser
numberOfSchemaFields | number of schema fields |
physicalTypes | vector with physical nes data types |
delimiter | delimiter of input file |
|
overridevirtual |
takes csv string line as input, casts its values to the correct types and writes it to the TupleBuffer
csvInput | csv string value(one line) that is cast to the PhysicalType and written to the TupleBuffer |
tupleCount | the number of tuples already written to the current TupleBuffer |
tupleBuffer | the TupleBuffer to which the value is written to containing the chosen memory layout |
schema | data schema |
bufferManager | the buffer manager |
Implements NES::Parser.
References NES_THROW_RUNTIME_ERROR, NES_TRACE, magic_enum::detail::values(), and NES::Parser::writeFieldValueToTupleBuffer().