Guys, I have a following situation:
let mut client = gcp_bigquery_client::Client::from_service_account_key_file(gcp_sa_key).await?;
client.storage_mut().append_rows(&stream_name, &table_descriptor, rows.as_ref().unwrap(), trace_id);
The problem:
rows variable is a Vec where actor is:
#[derive(Clone, PartialEq, Message)]
struct Actor{name:String,age:i32}
The rows are being created by reading a csv file. And here is the problem. This method allows to write to table in bigquery that is made of two columns, where first one is of type String and the other is integer.
Obviously this is less than satisfactory. What is the way in order to create those rows based on the table_descriptor or anything that will allow to not have that Actor struct predefined in such way?
Table descriptor:
pub struct TableDescriptor {
/// Descriptors of all the fields
pub field_descriptors: Vec<FieldDescriptor>,
}