Skip to content

impl: PartnerToken configuration property#1489

Open
sachinpro wants to merge 1 commit into
mainfrom
partnerToken_impl
Open

impl: PartnerToken configuration property#1489
sachinpro wants to merge 1 commit into
mainfrom
partnerToken_impl

Conversation

@sachinpro
Copy link
Copy Markdown
Collaborator

@sachinpro sachinpro commented Apr 7, 2026

Implementing PartnerToken optional configuration parameter as done for JDBC.

@sachinpro sachinpro force-pushed the partnerToken_impl branch 8 times, most recently from af29b28 to 2dd0285 Compare April 8, 2026 15:47
@sachinpro sachinpro marked this pull request as ready for review April 8, 2026 15:56
@sachinpro sachinpro requested a review from a team as a code owner April 8, 2026 15:56
@sachinpro sachinpro requested a review from logachev April 8, 2026 15:56
@sachinpro sachinpro force-pushed the partnerToken_impl branch from 2dd0285 to e269a8c Compare April 8, 2026 16:06
std::string partner_token = *partner_token_or;
options.set<google::cloud::UserAgentProductsOption>(
{"Google-Bigquery-ODBC/" + std::string(DRIVER_VERSION)});
{"Google-Bigquery-ODBC/" + std::string(DRIVER_VERSION) + partner_token});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: make a new std::string with the user-agent value to avoid mismatch between here & later in code?

namespace {

TEST(ParsePartnerToken, ValidFull) {
std::string raw = "(GPN:PartnerName; Environment)";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove space here to cover that scenario too?

std::string kms_key_name;
std::string psc;
TPC tpc;
std::string partner_token;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest creating new struct for "connection properties". partner_token doesn't logically belong to oauth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants