Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bigquery: Support storage api for query #184

Merged
merged 6 commits into from
Aug 11, 2023
Merged

Conversation

yoshidan
Copy link
Owner

QueryOption::default().with_enable_storage_read(true) enables storage read API for query.

#177

async fn run(client: &Client, project_id: &str) {
    let request = QueryRequest {
             query: "SELECT * FROM dataset.table".to_string(),
            ..Default::default()
    };
    let option = QueryOption::default().with_enable_storage_read(true);
    let mut iter = client.query_with_option::<Row>(project_id, request, option).await.unwrap();
     while let Some(row) = iter.next().await.unwrap() {
         let col1 = row.column::<String>(0);
         let col2 = row.column::<Option<String>>(1);
     }
}

@yoshidan yoshidan added the safe to test safe to test label Aug 11, 2023
@yoshidan yoshidan merged commit afaab45 into main Aug 11, 2023
@yoshidan yoshidan deleted the bq_storage_api_for_query branch August 11, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test safe to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant