docs.rs failed to build td-client-0.6.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
td-client-0.9.0
td-client-rust
Rust Client Library for Treasure Data
Install
Add the following dependency in Cargo.toml
[dependencies]
td-client = "0.6"
Usage
First, add this line to your crate root
extern crate td_client;
Next, set up a td-client with your API key for Treasure Data
use *;
use *;
let client = new;
Manipulate Database metadata
client.create_database.unwrap;
println!;
client.delete_database.unwrap;
Manipulate Table metadata
client.create_table.unwrap;
println!;
client.swap_table.unwrap;
client.rename_table.unwrap;
client.delete_table.unwrap;
Import data to table
// Import msgpack gzipped file
client.import_msgpack_gz_file_to_table.unwrap;
// Import records
let mut chunk = new.unwrap;
chunk.next_row.unwrap;
chunk.write_key_and_i64.unwrap;
chunk.write_key_and_str.unwrap;
chunk.write_key_and_u8.unwrap;
chunk.write_key_and_f32.unwrap;
chunk.next_row.unwrap;
chunk.write_key_and_i64.unwrap;
chunk.write_key_and_str.unwrap;
chunk.write_key_and_u8.unwrap;
let readable_chunk = chunk.close.unwrap;
client.import_msgpack_gz_file_to_table.unwrap;
Information of jobs
// List up jobs
println!;
// Look at the job
println!;
// Check the job's status
println!;
Issue a query
// Issue a query
let job_id = client.issue_job.unwrap;
println!;
// Download the result to a file
let result_file = create.unwrap;
client.download_job_result.unwrap;
// Do something for each record
client.each_row_in_job_result;