diff --git a/cpp/include/cudf/io/avro.hpp b/cpp/include/cudf/io/avro.hpp index 34410209c72..774690c939f 100644 --- a/cpp/include/cudf/io/avro.hpp +++ b/cpp/include/cudf/io/avro.hpp @@ -195,12 +195,9 @@ class avro_reader_options_builder { * * The following code snippet demonstrates how to read a dataset from a file: * @code - * ... - * std::string filepath = "dataset.avro"; - * cudf::avro_reader_options options = - * cudf::avro_reader_options::builder(cudf::source_info(filepath)); - * ... - * auto result = cudf::read_avro(options); + * auto source = cudf::io::source_info("dataset.avro"); + * auto options = cudf::io::avro_reader_options::builder(source); + * auto result = cudf::io::read_avro(options); * @endcode * * @param options Settings for controlling reading behavior. diff --git a/cpp/include/cudf/io/csv.hpp b/cpp/include/cudf/io/csv.hpp index d4a21b2e98c..fece1cb52b0 100644 --- a/cpp/include/cudf/io/csv.hpp +++ b/cpp/include/cudf/io/csv.hpp @@ -1185,11 +1185,9 @@ class csv_reader_options_builder { * * The following code snippet demonstrates how to read a dataset from a file: * @code - * std::string filepath = "dataset.csv"; - * cudf::io::csv_reader_options options = - * cudf::io::csv_reader_options::builder(cudf::source_info(filepath)); - * ... - * auto result = cudf::read_csv(options); + * auto source = cudf::io::source_info("dataset.csv"); + * auto options = cudf::io::csv_reader_options::builder(source); + * auto result = cudf::io::read_csv(options); * @endcode * * @param options Settings for controlling reading behavior. @@ -1514,12 +1512,12 @@ class csv_writer_options_builder { * * The following code snippet demonstrates how to write columns to a file: * @code - * std::string filepath = "dataset.csv"; - * cudf::io::sink_info sink_info(filepath); + * auto destination = cudf::io::sink_info("dataset.csv"); + * auto options = cudf::io::csv_writer_options(destination, table->view()) + * .na_rep(na) + * .include_header(include_header) + * .rows_per_chunk(rows_per_chunk); * - * cudf::io::csv_writer_options options = cudf::io::csv_writer_options(sink_info, - * table->view()).na_rep(na).include_header(include_header).rows_per_chunk(rows_per_chunk); - * ... * cudf::io::write_csv(options); * @endcode * diff --git a/cpp/include/cudf/io/json.hpp b/cpp/include/cudf/io/json.hpp index 8954f7dcab1..60f990c87d8 100644 --- a/cpp/include/cudf/io/json.hpp +++ b/cpp/include/cudf/io/json.hpp @@ -350,11 +350,9 @@ class json_reader_options_builder { * * The following code snippet demonstrates how to read a dataset from a file: * @code - * ... - * std::string filepath = "dataset.json"; - * cudf::read_json_options options = cudf::read_json_options::builder(cudf::source_info(filepath)); - * ... - * auto result = cudf::read_json(options); + * auto source = cudf::io::source_info("dataset.json"); + * auto options = cudf::io::read_json_options::builder(source); + * auto result = cudf::io::read_json(options); * @endcode * * @param options Settings for controlling reading behavior. diff --git a/cpp/include/cudf/io/orc.hpp b/cpp/include/cudf/io/orc.hpp index 52d3138d3a1..4ae09b516a4 100644 --- a/cpp/include/cudf/io/orc.hpp +++ b/cpp/include/cudf/io/orc.hpp @@ -346,12 +346,9 @@ class orc_reader_options_builder { * * The following code snippet demonstrates how to read a dataset from a file: * @code - * ... - * std::string filepath = "dataset.orc"; - * cudf::orc_reader_options options = - * cudf::orc_reader_options::builder(cudf::source_info(filepath)); - * ... - * auto result = cudf::read_orc(options); + * auto source = cudf::io::source_info("dataset.orc"); + * auto options = cudf::io::orc_reader_options::builder(source); + * auto result = cudf::io::read_orc(options); * @endcode * * Note: Support for reading files with struct columns is currently experimental, the output may not @@ -568,12 +565,9 @@ class orc_writer_options_builder { * * The following code snippet demonstrates how to write columns to a file: * @code - * ... - * std::string filepath = "dataset.orc"; - * cudf::orc_writer_options options = cudf::orc_writer_options::builder(cudf::sink_info(filepath), - * table->view()); - * ... - * cudf::write_orc(options); + * auto destination = cudf::io::sink_info("dataset.orc"); + * auto options = cudf::io::orc_writer_options::builder(destination, table->view()); + * cudf::io::write_orc(options); * @endcode * * @param options Settings for controlling reading behavior. diff --git a/cpp/include/cudf/io/parquet.hpp b/cpp/include/cudf/io/parquet.hpp index 031228ae6de..25cbb6fd554 100644 --- a/cpp/include/cudf/io/parquet.hpp +++ b/cpp/include/cudf/io/parquet.hpp @@ -354,12 +354,9 @@ class parquet_reader_options_builder { * * The following code snippet demonstrates how to read a dataset from a file: * @code - * ... - * std::string filepath = "dataset.parquet"; - * cudf::io::parquet_reader_options options = - * cudf::io::parquet_reader_options::builder(cudf::source_info(filepath)); - * ... - * auto result = cudf::read_parquet(options); + * auto source = cudf::io::source_info("dataset.parquet"); + * auto options = cudf::io::parquet_reader_options::builder(source); + * auto result = cudf::io::read_parquet(options); * @endcode * * @param options Settings for controlling reading behavior @@ -784,12 +781,9 @@ class parquet_writer_options_builder { * * The following code snippet demonstrates how to write columns to a file: * @code - * ... - * std::string filepath = "dataset.parquet"; - * cudf::io::parquet_writer_options options = - * cudf::io::parquet_writer_options::builder(cudf::sink_info(filepath), table->view()); - * ... - * cudf::write_parquet(options); + * auto destination = cudf::io::sink_info("dataset.parquet"); + * auto options = cudf::io::parquet_writer_options::builder(destination, table->view()); + * cudf::io::write_parquet(options); * @endcode * * @param options Settings for controlling writing behavior. @@ -1019,15 +1013,12 @@ std::unique_ptr> merge_rowgroup_metadata( * one logical table by writing a series of individual cudf::tables. * * @code - * ... - * std::string filepath = "dataset.parquet"; - * cudf::io::chunked_parquet_writer_options options = - * cudf::io::chunked_parquet_writer_options::builder(cudf::sink_info(filepath), table->view()); - * ... - * cudf::io::parquet_chunked_writer writer(options) + * auto destination = cudf::io::sink_info("dataset.parquet"); + * auto options = cudf::io::chunked_parquet_writer_options::builder(destination, table->view()); + * auto writer = cudf::io::parquet_chunked_writer(options); + * * writer.write(table0) * writer.write(table1) - * ... * writer.close() * @endcode */