Safe Haskell | None |
---|---|
Language | Haskell98 |
- printRecordInfo :: RecordInfo -> IO ()
- alteryxCsvSettings :: CSVSettings
- csv2bytes :: MonadThrow m => Conduit Text m ByteString
- csv2records :: MonadThrow m => CSVSettings -> Conduit Text m Record
- parseCSVHeader :: Parser RecordInfo
- record2csv :: MonadResource m => RecordInfo -> Conduit Record m Text
- sourceCsvRecords :: MonadResource m => FilePath -> Maybe Text -> CSVSettings -> Source m Record
- getValue :: Field -> Get (Maybe FieldValue)
- getAllVariableData :: Get ByteString
- parseFieldType :: Text -> FieldType
- putValue :: Field -> Maybe FieldValue -> Put
- renderFieldType :: FieldType -> Text
- data DbType
- data YxdbMetadata = YxdbMetadata {}
- data YxdbFile = YxdbFile {}
- data Header = Header {}
- newtype Record = Record [Maybe FieldValue]
- newtype RecordInfo = RecordInfo [Field]
- newtype Miniblock = Miniblock ByteString
- newtype Block = Block ByteString
- newtype BlockIndex = BlockIndex (UArray Int Int64)
- data FieldValue
- data FieldType
- data Field = Field {
- _fieldName :: Text
- _fieldType :: FieldType
- _fieldSize :: Maybe Int
- _fieldScale :: Maybe Int
- data StreamingCSVStatistics = StreamingCSVStatistics {}
- defaultStatistics :: StreamingCSVStatistics
- fieldType :: Lens' Field FieldType
- fieldSize :: Lens' Field (Maybe Int)
- fieldScale :: Lens' Field (Maybe Int)
- fieldName :: Lens' Field Text
- yxdbFileRecords :: Lens' YxdbFile [Record]
- yxdbFileMetadata :: Lens' YxdbFile RecordInfo
- yxdbFileHeader :: Lens' YxdbFile Header
- yxdbFileBlockIndex :: Lens' YxdbFile BlockIndex
- spatialIndexPos :: Lens' Header Word64
- reservedSpace :: Lens' Header ByteString
- recordBlockIndexPos :: Lens' Header Word64
- numRecords :: Lens' Header Word64
- mystery :: Lens' Header Word32
- metaInfoLength :: Lens' Header Word32
- flags2 :: Lens' Header Word32
- flags1 :: Lens' Header Word32
- fileId :: Lens' Header Word32
- description :: Lens' Header Text
- creationDate :: Lens' Header UTCTime
- compressionVersion :: Lens' Header Word32
- metadataRecordInfo :: Lens' YxdbMetadata RecordInfo
- metadataHeader :: Lens' YxdbMetadata Header
- metadataBlockIndex :: Lens' YxdbMetadata BlockIndex
- statisticsNumRecords :: Lens' StreamingCSVStatistics Int
- statisticsMetadataLength :: Lens' StreamingCSVStatistics Int
- statisticsBlockLengths :: Lens' StreamingCSVStatistics [Int]
- dbFileId :: DbType -> Word32
- getRecord :: RecordInfo -> Get Record
- getValue :: Field -> Get (Maybe FieldValue)
- putRecord :: RecordInfo -> Record -> Put
- putValue :: Field -> Maybe FieldValue -> Put
- headerPageSize :: Int
- miniblockThreshold :: Int
- numMetadataBytesActual :: RecordInfo -> Int
- numMetadataBytesHeader :: Header -> Int
- numBlockBytesActual :: Block -> Int
- numBlockBytesHeader :: Header -> Int
- parseRecordsUntil :: RecordInfo -> Get [Record]
- recordsPerBlock :: Int
- startOfBlocksByteIndex :: Header -> Int
- blocksToDecompressedBytes :: MonadThrow m => Conduit Block m ByteString
- blocksToRecords :: MonadThrow m => RecordInfo -> Conduit Block m Record
- sinkRecords :: (MonadThrow m, MonadIO m) => Handle -> RecordInfo -> Sink Record m ()
- getMetadata :: FilePath -> IO YxdbMetadata
- recordsToBlocks :: MonadThrow m => RecordInfo -> StatefulConduit Record m Block
- sourceFileBlocks :: MonadResource m => FilePath -> YxdbMetadata -> Source m Block
- sourceFileRecords :: (MonadResource m, MonadIO m) => FilePath -> Source m Record
Documentation
printRecordInfo :: RecordInfo -> IO () Source
alteryxCsvSettings :: CSVSettings Source
Our CSVs are pipe('|')-separated and do not do quoting.
csv2bytes :: MonadThrow m => Conduit Text m ByteString Source
All CSV text should be UTF-8 encoded.
csv2records :: MonadThrow m => CSVSettings -> Conduit Text m Record Source
record2csv :: MonadResource m => RecordInfo -> Conduit Record m Text Source
sourceCsvRecords :: MonadResource m => FilePath -> Maybe Text -> CSVSettings -> Source m Record Source
Stream the parsed records from a CSV file
getAllVariableData :: Get ByteString Source
Retrieves the bytesting representing all variable data for the current record
parseFieldType :: Text -> FieldType Source
renderFieldType :: FieldType -> Text Source
Header | |
|
newtype RecordInfo Source
newtype BlockIndex Source
data FieldValue Source
Field | |
|
getRecord :: RecordInfo -> Get Record Source
Records consists of a fixed amount of data for each field, and also a possibly large amoutn of variable data at the end.
putRecord :: RecordInfo -> Record -> Put Source
Writes a record using the provided metadata.
Number of bytes taken by the fixed header
miniblockThreshold :: Int Source
When writing miniblocks, how many bytes should each miniblock aim for?
numBlockBytesActual :: Block -> Int Source
numBlockBytesHeader :: Header -> Int Source
parseRecordsUntil :: RecordInfo -> Get [Record] Source
Number of records before each block is flushed and added to the block index
blocksToRecords :: MonadThrow m => RecordInfo -> Conduit Block m Record Source
sinkRecords :: (MonadThrow m, MonadIO m) => Handle -> RecordInfo -> Sink Record m () Source
getMetadata :: FilePath -> IO YxdbMetadata Source
recordsToBlocks :: MonadThrow m => RecordInfo -> StatefulConduit Record m Block Source
sourceFileBlocks :: MonadResource m => FilePath -> YxdbMetadata -> Source m Block Source
sourceFileRecords :: (MonadResource m, MonadIO m) => FilePath -> Source m Record Source