You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: integration_tests.rs
    path of file: ./repos/vector/src/sinks/databend
    
    the code of the file until where you have to start completion: use std::collections::BTreeMap;

use futures::future::ready;
use futures::stream;

use vector_lib::config::proxy::ProxyConfig;
use vector_lib::event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event, LogEvent};
use vector_lib::sensitive_string::SensitiveString;

use crate::sinks::util::test::load_sink;
use crate::{
    config::{SinkConfig, SinkContext},
    http::{Auth, HttpClient},
    sinks::util::UriSerde,
    test_util::{
        components::{run_and_assert_sink_compliance, HTTP_SINK_TAGS},
        random_string, trace_init,
    },
};

use super::{
    api::{DatabendAPIClient, DatabendHttpRequest, DatabendHttpResponse},
    config::DatabendConfi
    
async fn insert_event_with_cfg(cfg: String, table: String, client: DatabendAPIClient) {
    let create_table_sql = format!(
        "create table `{}` (host String, timestamp String, message String)",
        table
    );
    client
        .query(DatabendHttpRequest::new(create_table_sql))
        .await
        .unwrap();

    let (config, _) = load_sink::<DatabendConfig>(&cfg).unwrap();
    let (sink, _hc) = config.build(SinkContext::default()).await.unwrap();

    let (input_event, mut receiver) = make_event();
    run_and_assert_sink_compliance(
        sink,
        stream::once(ready(input_event.clone())),
        &HTTP_SINK_TAGS,
    )
    .await;

    let select_all_sql = format!("select * from `{}`", table);
    let resp = client
        .query(DatabendHttpRequest::new(select_all_sql))
        .await
        .unwrap();
    assert_eq!(1, resp.data.len());

    // drop input_event after comparing with response
    {
        let log_event = input_event.into_log();
        let expected = serde_json::to_string(&log_event).unwrap();
        let resp_data = response_to_map(&resp);
        let actual = serde_json::to_string(&resp_data[0]).unwrap();
        assert_eq!(expected, actual);
    }

    assert_eq!(receiver.try_recv(), Ok(BatchStatus::Delivered));
}