Skip to content

Commit

Permalink
Merge pull request #25 from samansmink/add-session-token-support
Browse files Browse the repository at this point in the history
add session token support
  • Loading branch information
samansmink authored May 31, 2024
2 parents 4d64707 + f161fe1 commit 90f9557
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/functions/delta_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ static ffi::EngineBuilder* CreateBuilder(ClientContext &context, const string &p

auto key_id = kv_secret.TryGetValue("key_id").ToString();
auto secret = kv_secret.TryGetValue("secret").ToString();
auto session_token = kv_secret.TryGetValue("session_token").ToString();
auto region = kv_secret.TryGetValue("region").ToString();

if (key_id.empty() && secret.empty()) {
Expand All @@ -112,6 +113,9 @@ static ffi::EngineBuilder* CreateBuilder(ClientContext &context, const string &p
if (!secret.empty()) {
ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_secret_access_key"), KernelUtils::ToDeltaString(secret));
}
if (!session_token.empty()) {
ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_session_token"), KernelUtils::ToDeltaString(session_token));
}
ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_region"), KernelUtils::ToDeltaString(region));

return builder;
Expand Down

0 comments on commit 90f9557

Please sign in to comment.