File tree Expand file tree Collapse file tree 3 files changed +3
-19
lines changed
kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb Expand file tree Collapse file tree 3 files changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import aws.sdk.kotlin.services.dynamodb.model.BillingMode
1010import aws.sdk.kotlin.services.dynamodb.model.CreateTableRequest
1111import aws.sdk.kotlin.services.dynamodb.model.KeySchemaElement
1212import aws.sdk.kotlin.services.dynamodb.model.KeyType
13- import aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughput
1413import aws.sdk.kotlin.services.dynamodb.model.ScalarAttributeType
1514import aws.sdk.kotlin.services.dynamodb.waiters.waitUntilTableExists
1615import kotlin.system.exitProcess
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
3535*/
3636
3737// snippet-start:[dynamodb.kotlin.scenario.main]
38- suspend fun main (args : Array < String > ) {
38+ suspend fun main () {
3939 val tableName = " Movies"
4040 val fileName = " ../../../resources/sample_files/movies.json"
4141 val partitionAlias = " #a"
Original file line number Diff line number Diff line change @@ -33,25 +33,10 @@ import kotlin.system.exitProcess
3333*/
3434
3535// snippet-start:[dynamodb.kotlin.scenario.partiql.main]
36- suspend fun main (args : Array <String >) {
37- val usage = """
38- Usage:
39- <fileName>
40-
41- Where:
42- fileName - The path to the moviedata.json file You can download from the Amazon DynamoDB Developer Guide.
43- """
44-
45- if (args.size != 1 ) {
46- println (usage)
47- exitProcess(1 )
48- }
49-
36+ suspend fun main () {
5037 val ddb = DynamoDbClient { region = " us-east-1" }
5138 val tableName = " MoviesPartiQ"
52-
53- // Get the moviedata.json from the Amazon DynamoDB Developer Guide.
54- val fileName = args[0 ]
39+ val fileName = " ../../../resources/sample_files/movies.json"
5540 println (" Creating an Amazon DynamoDB table named MoviesPartiQ with a key named id and a sort key named title." )
5641 createTablePartiQL(ddb, tableName, " year" )
5742 loadDataPartiQL(ddb, fileName)
You can’t perform that action at this time.
0 commit comments