Skip to content

Instantly share code, notes, and snippets.

@OksanaH
Last active December 4, 2020 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OksanaH/5e9e91e7c236b3a3f3c0a8acf24a10cf to your computer and use it in GitHub Desktop.
Save OksanaH/5e9e91e7c236b3a3f3c0a8acf24a10cf to your computer and use it in GitHub Desktop.
for (var i = 0; i <= 100; i++)
{
var putItemRequest = new PutItemRequest
{
TableName = sourceTableName,
Item = new Dictionary<string, AttributeValue>()
{
{"City", new AttributeValue{S=cities[(new Random()).Next(cities.Length)] } },
{"Date", new AttributeValue{S=GetRandom2020Date() } },
{"Highest", new AttributeValue{N=(new Random()).Next(20,30).ToString() } },
{"Lowest", new AttributeValue{N=(new Random()).Next(1,10).ToString() } }
}
};
await client.PutItemAsync(putItemRequest);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment