Public Member Functions | Static Public Member Functions | List of all members
cudf::io::json_writer_options Class Reference

Settings to use for write_json(). More...

#include <json.hpp>

Public Member Functions

 json_writer_options ()=default
 Default constructor. More...
 
sink_info const & get_sink () const
 Returns sink used for writer output. More...
 
table_view const & get_table () const
 Returns table that would be written to output. More...
 
std::optional< table_metadata > const & get_metadata () const
 Returns metadata information. More...
 
std::string const & get_na_rep () const
 Returns string to used for null entries. More...
 
bool is_enabled_include_nulls () const
 Whether to output nulls as 'null'. More...
 
bool is_enabled_lines () const
 Whether to use JSON lines for records format. More...
 
size_type get_rows_per_chunk () const
 Returns maximum number of rows to process for each file write. More...
 
std::string const & get_true_value () const
 Returns string used for values != 0 in INT8 types. More...
 
std::string const & get_false_value () const
 Returns string used for values == 0 in INT8 types. More...
 
void set_table (table_view tbl)
 Sets table to be written to output. More...
 
void set_metadata (table_metadata metadata)
 Sets metadata. More...
 
void set_na_rep (std::string val)
 Sets string to used for null entries. More...
 
void enable_include_nulls (bool val)
 Enables/Disables output of nulls as 'null'. More...
 
void enable_lines (bool val)
 Enables/Disables JSON lines for records format. More...
 
void set_rows_per_chunk (size_type val)
 Sets maximum number of rows to process for each file write. More...
 
void set_true_value (std::string val)
 Sets string used for values != 0 in INT8 types. More...
 
void set_false_value (std::string val)
 Sets string used for values == 0 in INT8 types. More...
 

Static Public Member Functions

static json_writer_options_builder builder (sink_info const &sink, table_view const &table)
 Create builder to create json_writer_options. More...
 

Detailed Description

Settings to use for write_json().

Definition at line 920 of file io/json.hpp.

Constructor & Destructor Documentation

◆ json_writer_options()

cudf::io::json_writer_options::json_writer_options ( )
explicitdefault

Default constructor.

This has been added since Cython requires a default constructor to create objects on stack.

Member Function Documentation

◆ builder()

static json_writer_options_builder cudf::io::json_writer_options::builder ( sink_info const &  sink,
table_view const &  table 
)
static

Create builder to create json_writer_options.

Parameters
sinkThe sink used for writer output
tableTable to be written to output
Returns
Builder to build json_writer_options

◆ enable_include_nulls()

void cudf::io::json_writer_options::enable_include_nulls ( bool  val)
inline

Enables/Disables output of nulls as 'null'.

Parameters
valBoolean value to enable/disable

Definition at line 1062 of file io/json.hpp.

◆ enable_lines()

void cudf::io::json_writer_options::enable_lines ( bool  val)
inline

Enables/Disables JSON lines for records format.

Parameters
valBoolean value to enable/disable JSON lines

Definition at line 1069 of file io/json.hpp.

◆ get_false_value()

std::string const& cudf::io::json_writer_options::get_false_value ( ) const
inline

Returns string used for values == 0 in INT8 types.

Returns
string used for values == 0 in INT8 types

Definition at line 1032 of file io/json.hpp.

◆ get_metadata()

std::optional<table_metadata> const& cudf::io::json_writer_options::get_metadata ( ) const
inline

Returns metadata information.

Returns
Metadata information

Definition at line 990 of file io/json.hpp.

◆ get_na_rep()

std::string const& cudf::io::json_writer_options::get_na_rep ( ) const
inline

Returns string to used for null entries.

Returns
string to used for null entries

Definition at line 997 of file io/json.hpp.

◆ get_rows_per_chunk()

size_type cudf::io::json_writer_options::get_rows_per_chunk ( ) const
inline

Returns maximum number of rows to process for each file write.

Returns
Maximum number of rows to process for each file write

Definition at line 1018 of file io/json.hpp.

◆ get_sink()

sink_info const& cudf::io::json_writer_options::get_sink ( ) const
inline

Returns sink used for writer output.

Returns
sink used for writer output

Definition at line 976 of file io/json.hpp.

◆ get_table()

table_view const& cudf::io::json_writer_options::get_table ( ) const
inline

Returns table that would be written to output.

Returns
Table that would be written to output

Definition at line 983 of file io/json.hpp.

◆ get_true_value()

std::string const& cudf::io::json_writer_options::get_true_value ( ) const
inline

Returns string used for values != 0 in INT8 types.

Returns
string used for values != 0 in INT8 types

Definition at line 1025 of file io/json.hpp.

◆ is_enabled_include_nulls()

bool cudf::io::json_writer_options::is_enabled_include_nulls ( ) const
inline

Whether to output nulls as 'null'.

Returns
true if nulls are output as 'null'

Definition at line 1004 of file io/json.hpp.

◆ is_enabled_lines()

bool cudf::io::json_writer_options::is_enabled_lines ( ) const
inline

Whether to use JSON lines for records format.

Returns
true if JSON lines is used for records format

Definition at line 1011 of file io/json.hpp.

◆ set_false_value()

void cudf::io::json_writer_options::set_false_value ( std::string  val)
inline

Sets string used for values == 0 in INT8 types.

Parameters
valString to represent values == 0 in INT8 types

Definition at line 1090 of file io/json.hpp.

◆ set_metadata()

void cudf::io::json_writer_options::set_metadata ( table_metadata  metadata)
inline

Sets metadata.

Parameters
metadataAssociated metadata

Definition at line 1048 of file io/json.hpp.

◆ set_na_rep()

void cudf::io::json_writer_options::set_na_rep ( std::string  val)
inline

Sets string to used for null entries.

Parameters
valString to represent null value

Definition at line 1055 of file io/json.hpp.

◆ set_rows_per_chunk()

void cudf::io::json_writer_options::set_rows_per_chunk ( size_type  val)
inline

Sets maximum number of rows to process for each file write.

Parameters
valNumber of rows per chunk

Definition at line 1076 of file io/json.hpp.

◆ set_table()

void cudf::io::json_writer_options::set_table ( table_view  tbl)
inline

Sets table to be written to output.

Parameters
tblTable for the output

Definition at line 1041 of file io/json.hpp.

◆ set_true_value()

void cudf::io::json_writer_options::set_true_value ( std::string  val)
inline

Sets string used for values != 0 in INT8 types.

Parameters
valString to represent values != 0 in INT8 types

Definition at line 1083 of file io/json.hpp.


The documentation for this class was generated from the following file: