Amir, yes it is possible with ExecuteStatement. However I'm planning to write a blog about lambda execution of PartiQL statements and API gateway walkthrough.
constinsert_teams_bulk=async(event)=>{letpartiqlInsertParams={Statements:[]}for(letteamofevent.teams){letteamParams={pk:"TEAM",sk:team.name+"#"+team.group+"#"+team.ranking,display_name:team.name,team_group:team.group,ranking:team.ranking,matches_played:team.matches_played,matches_won:team.matches_won,matches_drew:team.matches_drew,matches_lost:team.matches_lost,goals_for:team.goals_for,goals_against:team.goals_against,goals_difference:team.goals_difference,team_points:team.team_points}letpartiqlStmt={Statement:`INSERT INTO "testing-partiql" VALUE "{'pk':'${teamParams.pk}','sk':'${teamParams.sk}','display_name':'${teamParams.display_name}','team_group':'${teamParams.team_group}','ranking':${teamParams.ranking},'matches_played':${teamParams.matches_played},'matches_won':${teamParams.matches_won},'matches_drew':${teamParams.matches_drew},'matches_lost':${teamParams.matches_lost},'goals_for':${teamParams.goals_for},'goals_against':${teamParams.goals_against},'goals_difference':${teamParams.goals_difference},'team_points':${teamParams.team_points}}"`,}partiqlInsertParams.Statements.push(partiqlStmt)}letresponse=awaitdynamodb.batchExecuteStatement(partiqlInsertParams).promise()returnresponse}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Amir, yes it is possible with ExecuteStatement. However I'm planning to write a blog about lambda execution of PartiQL statements and API gateway walkthrough.