This sample application shows how you can create a database and table, populate the table with ~126K rows of sample data, and run sample queries to jumpstart your evaluation and/or proof-of-concept applications with Amazon Timestream.
-
Install .NET
-
NOTE: If the older SDK has been installed, you might have to remove the older packages and clean cache before adding new SDKs.
dotnet remove package AWSSDK.Core dotnet remove package AWSSDK.TimestreamWrite dotnet remove package AWSSDK.TimestreamQuery dotnet remove package CommandLineParser dotnet nuget locals all --clear
-
Install required NuGet. Ensure package version are higher than what is mentioned in provided .csproj file.
dotnet add package AWSSDK.Core dotnet add package AWSSDK.S3 dotnet add package AWSSDK.SecurityToken dotnet add package AWSSDK.TimestreamWrite dotnet add package AWSSDK.TimestreamQuery dotnet add package CommandLineParser dotnet add package Newtonsoft.Json
-
Run the project
dotnet run
-
Run with kms key id for Update database
dotnet run -- -k ValidKmsKeyId
-
Run with sample csv data file
dotnet run -- -f ../data/sample.csv
-
Run Unload with sample csv data file
dotnet run -- -t UNLOAD -f ../data/sample_unload.csv
-
Run CompositePartitionKey sample
dotnet run -- -t COMPOSITE_PARTITION_KEY
-
Cleanup and delete the resources generated
dotnet run -- -t CLEANUP