{"id":23553347,"url":"https://github.com/liufuyang/bigtable_rs","last_synced_at":"2026-04-01T19:01:12.506Z","repository":{"id":37039416,"uuid":"331265559","full_name":"liufuyang/bigtable_rs","owner":"liufuyang","description":"A simple Rust library for working with Google Bigtable Data and Admin API V2","archived":false,"fork":false,"pushed_at":"2026-03-31T10:58:23.000Z","size":1893,"stargazers_count":25,"open_issues_count":2,"forks_count":15,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-31T12:31:11.835Z","etag":null,"topics":["bigtable","googleapis","grpc","rust","tonic"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bigtable_rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liufuyang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-20T10:05:47.000Z","updated_at":"2026-03-31T10:56:34.000Z","dependencies_parsed_at":"2024-03-19T20:41:33.809Z","dependency_job_id":"ae3191a9-8d24-4cf7-b32a-2548e3192408","html_url":"https://github.com/liufuyang/bigtable_rs","commit_stats":{"total_commits":116,"total_committers":10,"mean_commits":11.6,"dds":"0.22413793103448276","last_synced_commit":"1f1d7aa6b44609e12da906c65ee8143203285a16"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/liufuyang/bigtable_rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liufuyang%2Fbigtable_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liufuyang%2Fbigtable_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liufuyang%2Fbigtable_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liufuyang%2Fbigtable_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liufuyang","download_url":"https://codeload.github.com/liufuyang/bigtable_rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liufuyang%2Fbigtable_rs/sbom","scorecard":{"id":593428,"data":{"date":"2025-08-11","repo":{"name":"github.com/liufuyang/bigtable_rs","commit":"f487a9a95ed9d1db81bb3cc580a931d64c627eaf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.1,"checks":[{"name":"Code-Review","score":2,"reason":"Found 8/29 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/CI.yaml:12","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yaml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yaml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yaml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yaml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/liufuyang/bigtable_rs/CI.yaml/main?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T22:32:26.115Z","repository_id":37039416,"created_at":"2025-08-20T22:32:26.115Z","updated_at":"2025-08-20T22:32:26.115Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigtable","googleapis","grpc","rust","tonic"],"created_at":"2024-12-26T11:14:52.213Z","updated_at":"2026-04-01T19:01:12.497Z","avatar_url":"https://github.com/liufuyang.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bigtable_rs\n\nA simple Rust library for working\nwith [Google Bigtable](https://cloud.google.com/bigtable/docs/) [Data API V2](https://cloud.google.com/bigtable/docs/reference/data/rpc/google.bigtable.v2)\n.\n\n[![ci_badge](https://github.com/liufuyang/bigtable_rs/actions/workflows/CI.yaml/badge.svg)](https://github.com/liufuyang/bigtable_rs/actions/workflows/CI.yaml)\n[![Crates.io](https://img.shields.io/crates/v/bigtable_rs)](https://crates.io/crates/bigtable_rs)\n[![Documentation](https://docs.rs/bigtable_rs/badge.svg)](https://docs.rs/bigtable_rs)\n[![codecov](https://codecov.io/github/liufuyang/bigtable_rs/graph/badge.svg?token=U9LTK0V10S)](https://codecov.io/github/liufuyang/bigtable_rs)\n[![Crates.io](https://img.shields.io/crates/l/bigtable_rs)](LICENSE)\n\n## Disclaimer - might be ready for production use\n\nThis library might be production ready. Any contribution or help is highly appreciated.\n\nI had the idea to build a client like this and got some input from others\nsee [here](https://github.com/durch/rust-bigtable/issues/4)\nand porting code from [here](\nhttps://github.com/solana-labs/solana/tree/master/storage-bigtable)\n(thanks to [@mvines](https://github.com/mvines)).\n\nCode\nfor [read_rows parsing](https://github.com/liufuyang/bigtable_rs/blob/main/bigtable_rs/src/bigtable/read_rows.rs#L36-L212)\nlogic\nis [tested](https://github.com/liufuyang/bigtable_rs/blob/main/bigtable_rs/tests/read_rows/read_rows_test.rs)\nby [porting](https://github.com/liufuyang/bigtable_rs/blob/main/bigtable_rs/tests/read_rows/read_rows_test.json)\nGoogle's Java client\n[tests code](https://github.com/googleapis/java-bigtable/blob/main/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsMergingAcceptanceTest.java)\nwith [json test cases](https://github.com/googleapis/conformance-tests/blob/main/bigtable/v2/readrows.json)\nas raw\ninput.\n\n## Introduction\n\nCurrent idea is to make this library very light weighted, and you assemble requests based\non [Google Bigtable V2 protobuf schema](https://github.com/googleapis/googleapis/blob/master/google/bigtable/v2/bigtable.proto)\nand send the requests via [tonic gRPC over HTTP/2](https://github.com/hyperium/tonic). So the user\nhave the flexibility\nof creating any type of Bigtable request and use this client to talk to Bigtable service.\n\nCompiled Bigtable API proto as Rust code is also included in the repo here so users don't need to\ncompile from proto\nagain.\n\nThe returned row values from Bigtable is parsed by this library.\n\nSee more examples on how to use:\n\n* [ReadRows](examples/src/simple_read.rs)\n* [MutateRows](examples/src/simple_write.rs)\n* [SampleRowKeys](examples/src/sample_row_keys.rs)\n* [Read with a prefix](examples/src/prefix.rs)\n\nFor other gRPC APIs/methods, one should be able to use the gRCP client directly and assemble any\ncustomized request you\nneed to\ninteract with Bigtable service via building the Protobuf messages (already complied as rs files and\nincluded here).\nSee [this example](./examples/src/custom_query.rs).\n\n[gcp_auth](https://github.com/hrvolapeter/gcp_auth) is used, which\nsupports:\n\n* Application Default Credentials\n* Connection authenticated via Google service account key `json` file\n  (by setting `GOOGLE_APPLICATION_CREDENTIALS=path/to/key.json` environment parameter)\n* Default service account by retrieving a token from the gcloud metadata server\n\nDepends on [googleapis_tonic_google_bigtable_v2](https://crates.io/crates/googleapis_tonic_google_bigtable_v2) - which is a crate\ncontains all the Bigtable Rust types generated from\ngoogleapis Bigtable protos by using tonic build.\n\nYou can use the library as follows:\n\n```toml\n[dependencies]\nbigtable_rs = \"0.3.0\"\ntokio = { version = \"1.0\", features = [\"rt-multi-thread\"] }\ngoogleapis_tonic_google_bigtable_v2 = \"0.36.0\"\nenv_logger = \"0.11.1\"\n```\n\nDocumentation is on [crate.io](https://docs.rs/bigtable_rs/0.1.3/bigtable_rs/).\nSee [examples](./examples) folders for more examples. The following example showing how to do a key\nrange scan\n\n```rust\nuse bigtable_rs::bigtable;\nuse googleapis_tonic_google_bigtable_v2::google::bigtable::v2::row_filter::{Chain, Filter};\nuse googleapis_tonic_google_bigtable_v2::google::bigtable::v2::row_range::{EndKey, StartKey};\nuse googleapis_tonic_google_bigtable_v2::google::bigtable::v2::{ReadRowsRequest, RowFilter, RowRange, RowSet};\nuse env_logger;\nuse std::error::Error;\nuse std::time::Duration;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n    env_logger::init();\n\n    let project_id = \"project-id\";\n    let instance_name = \"instance-1\";\n    let table_name = \"table-1\";\n    let channel_size = 4;\n    let timeout = Duration::from_secs(10);\n\n    let key_start: String = \"key1\".to_owned();\n    let key_end: String = \"key4\".to_owned();\n\n    // make a bigtable client\n    let connection = bigtable::BigTableConnection::new(\n        project_id,\n        instance_name,\n        true,\n        channel_size,\n        Some(timeout),\n    )\n        .await?;\n    let mut bigtable = connection.client();\n\n    // prepare a ReadRowsRequest\n    let request = ReadRowsRequest {\n        table_name: bigtable.get_full_table_name(table_name),\n        rows_limit: 10,\n        rows: Some(RowSet {\n            row_keys: vec![], // use this field to put keys for reading specific rows\n            row_ranges: vec![RowRange {\n                start_key: Some(StartKey::StartKeyClosed(key_start.into_bytes())),\n                end_key: Some(EndKey::EndKeyOpen(key_end.into_bytes())),\n            }],\n        }),\n        filter: Some(RowFilter {\n            filter: Some(Filter::Chain(Chain {\n                filters: vec![\n                    RowFilter {\n                        filter: Some(Filter::FamilyNameRegexFilter(\"cf1\".to_owned())),\n                    },\n                    RowFilter {\n                        filter: Some(Filter::ColumnQualifierRegexFilter(\"c1\".as_bytes().to_vec())),\n                    },\n                    RowFilter {\n                        filter: Some(Filter::CellsPerColumnLimitFilter(2)),\n                    },\n                ],\n            })),\n        }),\n        ..ReadRowsRequest::default()\n    };\n\n    // calling bigtable API to get results\n    let response = bigtable.read_rows(request).await?;\n\n    // simply print results for example usage\n    response.into_iter().for_each(|(key, data)| {\n        println!(\"------------\\n{}\", String::from_utf8(key.clone()).unwrap());\n        data.into_iter().for_each(|row_cell| {\n            println!(\n                \"    [{}:{}] \\\"{}\\\" @ {}\",\n                row_cell.family_name,\n                String::from_utf8(row_cell.qualifier).unwrap(),\n                String::from_utf8(row_cell.value).unwrap(),\n                row_cell.timestamp_micros\n            )\n        })\n    });\n\n    Ok(())\n}\n\n```\n\n---\n\n## Play with example code\n\nTo start develop or test the example code above,\ninstall [cbt](https://cloud.google.com/bigtable/docs/cbt-overview) tool if you haven't,\nthen start a test Bigtable instance locally and insert some test data like this:\n\n```\n# at one terminal, start a bigtable insatnce locally\n. start_bigtable_local.sh\n\n# at another terminal, load some data into it\n. start_load_table_local.sh\n```\n\nThen run an example with this command:\n\n```\nBIGTABLE_EMULATOR_HOST=localhost:8086 RUST_LOG=bigtable_rs=trace cargo run --bin simple_read\n```\n\nIf you see error related to google authentication or gcp project not found,\nthen remember to set environment parameter `BIGTABLE_EMULATOR_HOST=localhost:8086`\nso to let the example's client connect onto the local emulator.\n\nTo run it against real Bigtable instance:\n\n```\nGOOGLE_APPLICATION_CREDENTIALS=\u003cpath_to_key\u003e/service_account_key.json cargo run --bin simple_read\n```\n\nOr if you want to use your `gcloud auth login` auth then simply run the client without any special\nenv settings:\n\n```\ncargo run --bin simple_read\n```\n\nSee `examples` folders for more examples.\n\n## Development\n\nClone this repo (and checkout the submodules if rebuilding of the\nGoogleapis proto is needed), and run `cargo build`.\n\n```\ncargo build\n\n# Or set BUILD_BIGTABLE_RS_GOOGLE_PROTO=true to enable rebuild of google protos\n# BUILD_BIGTABLE_RS_GOOGLE_PROTO=true cargo build\n```\n\nSee `bigtable_rs/src/build.rs` for more details.\n\nRunning tests:\n\n```\ncargo test -- --nocapture\n\n# Or run with integration tests (requires a bigtable emulator running)\n\nBIGTABLE_EMULATOR_HOST=localhost:8086 cargo test --features integration_tests\n```\n\nSee code coverage:\n\n```\nrustup component add llvm-tools-preview\ncargo install cargo-llvm-cov\n\ncargo llvm-cov --no-cfg-coverage  --ignore-filename-regex \"google/\" --html --open\n\n# Or run with integration test (requires a bigtable emulator running)\n\nBIGTABLE_EMULATOR_HOST=localhost:8086 cargo llvm-cov --no-cfg-coverage  --ignore-filename-regex \"google/\" --features integration_tests --html --open\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliufuyang%2Fbigtable_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliufuyang%2Fbigtable_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliufuyang%2Fbigtable_rs/lists"}