Script to write a csv with partner info into biztech users, profiles, members, and register for specific event (blueprint 2026)#640
Conversation
| // NOTE: ADJUSTED FOR BLUEPRINT 2026 | ||
|
|
||
| // Fallback in case email already exists | ||
| async function upsertPartnerEntries(user) { |
There was a problem hiding this comment.
We don't need a fallback here, just a PutCommand will handle creating new if it doesn't exist, or updating it in case it does
There was a problem hiding this comment.
There was a problem hiding this comment.
This will just automatically throw and without fallback, won't update partner profile or sign them up for blueprint.
There was a problem hiding this comment.
Can't we just remove the condition expression then?
There was a problem hiding this comment.
overwriting stuff may not be smart
| } catch (error) { | ||
| if (error.name === "ConditionalCheckFailedException") { | ||
| console.log(`Entry already exists for ${user.email}`); | ||
| console.log(`Entry already exists for ${user.email}, attempting profile upsert`); |
There was a problem hiding this comment.
Same as above, we should not need to have additional logic in the catch clause
|
|
||
| const awsConfig = { | ||
| accessKeyId: process.env.AWS_ACCESS_KEY_ID, | ||
| accessKeyId: process.env.AWS_ACCESS_KEY_ID, // change this |
There was a problem hiding this comment.
Why does this need to be changed?
| region: "us-west-2" | ||
| }; | ||
|
|
||
| const destConfig = { |
There was a problem hiding this comment.
I don't see it being used anywhere
There was a problem hiding this comment.
Kevin added instructions in a file i just forgot to remove before commiting. Will remove

Pretty much the same flow as was previously in the code.
I did add an fallback method to call if the partner (email) is already registered as a user. Previously, we would just insta throw an error, but this new method should just fill in the missing pieces if their are any, and register for blueprint 2026.
I have not tested yet as i don't know how to run it.
The CSV reader is specially tailored to the columns in this the confirmed partner sheets:
https://docs.google.com/spreadsheets/d/1dlY2ESfsdsC7OFsnnz4ekoAEh60jXbtRUQKlvdEazAE/edit?gid=2142808681#gid=2142808681