scanNdjson method

LazyFrame scanNdjson(
  1. String path, {
  2. NdjsonScanOptions options = const NdjsonScanOptions(),
})

Implementation

LazyFrame scanNdjson(
  String path, {
  NdjsonScanOptions options = const NdjsonScanOptions(),
}) {
  _validateLocalPath(path);
  _validateUnsigned(options.nRows, 'options.nRows');
  final inferSchemaLength = options.inferSchemaLength;
  if (inferSchemaLength != null && inferSchemaLength <= 0) {
    throw RangeError.value(
      inferSchemaLength,
      'options.inferSchemaLength',
      'must be positive',
    );
  }
  return _adoptLazy(
    _client.invokeSync('lazyScanNdjson', {
      'path': path,
      ...options._toJson(),
    }),
  );
}