how to query array of primary key values in dynamodb
up vote
0
down vote
favorite
I have one table in AWS Dynamodb with 1 million records.is it possible to query array of primary key values in one query with additional sort key condition in dynamodb?I am using for my server side logic.
Here is the params
var params = {
TableName: "client_logs",
KeyConditionExpression: "#accToken = :value AND ts between :val1 and
:val2",
ExpressionAttributeNames: {
"#accToken": "acc_token"
},
ExpressionAttributeValues: {
":value": clientAccessToken,
":val1": parseInt(fromDate),
":val2": parseInt(toDate),
":status":confirmStatus
},
FilterExpression:"apiAction = :status"
};
Here acc_token is the primary key and I want to query array of access_token values in one single query.
node.js amazon-web-services amazon-dynamodb dynamodb-queries
add a comment |
up vote
0
down vote
favorite
I have one table in AWS Dynamodb with 1 million records.is it possible to query array of primary key values in one query with additional sort key condition in dynamodb?I am using for my server side logic.
Here is the params
var params = {
TableName: "client_logs",
KeyConditionExpression: "#accToken = :value AND ts between :val1 and
:val2",
ExpressionAttributeNames: {
"#accToken": "acc_token"
},
ExpressionAttributeValues: {
":value": clientAccessToken,
":val1": parseInt(fromDate),
":val2": parseInt(toDate),
":status":confirmStatus
},
FilterExpression:"apiAction = :status"
};
Here acc_token is the primary key and I want to query array of access_token values in one single query.
node.js amazon-web-services amazon-dynamodb dynamodb-queries
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have one table in AWS Dynamodb with 1 million records.is it possible to query array of primary key values in one query with additional sort key condition in dynamodb?I am using for my server side logic.
Here is the params
var params = {
TableName: "client_logs",
KeyConditionExpression: "#accToken = :value AND ts between :val1 and
:val2",
ExpressionAttributeNames: {
"#accToken": "acc_token"
},
ExpressionAttributeValues: {
":value": clientAccessToken,
":val1": parseInt(fromDate),
":val2": parseInt(toDate),
":status":confirmStatus
},
FilterExpression:"apiAction = :status"
};
Here acc_token is the primary key and I want to query array of access_token values in one single query.
node.js amazon-web-services amazon-dynamodb dynamodb-queries
I have one table in AWS Dynamodb with 1 million records.is it possible to query array of primary key values in one query with additional sort key condition in dynamodb?I am using for my server side logic.
Here is the params
var params = {
TableName: "client_logs",
KeyConditionExpression: "#accToken = :value AND ts between :val1 and
:val2",
ExpressionAttributeNames: {
"#accToken": "acc_token"
},
ExpressionAttributeValues: {
":value": clientAccessToken,
":val1": parseInt(fromDate),
":val2": parseInt(toDate),
":status":confirmStatus
},
FilterExpression:"apiAction = :status"
};
Here acc_token is the primary key and I want to query array of access_token values in one single query.
node.js amazon-web-services amazon-dynamodb dynamodb-queries
node.js amazon-web-services amazon-dynamodb dynamodb-queries
asked Nov 21 at 16:08
Test Mail
95
95
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
No, it is not possible. A single query may search only one specific hash key value. (See DynamoDB – Query.)
You can, however, execute multiple queries in parallel, which will have the effect you desire.
Edit (2018-11-21)
Since you said there are 200+ hash keys that you are looking for, here are two possible solutions. These solutions do not require unbounded, parallel calls to DynamoDB, but they will cost you more RCU. They may be faster or slower, depending on the distribution of data in your table.
I don't know the distribution of your data, so I can't say which one is best for you. In all cases, we can't use acc_token
as the sort key of the GSI because you can't use the IN
operator in a KeyConditionExpression. (See DynamoDB – Condition.)
Solution 1
This strategy is based on Global Secondary Index Write Sharding for Selective Table Queries
Steps:
- Add a new attribute to items that you write to your table. This new attribute can be a number or string. Let's call it
index_partition
. - When you write a new item to your table, give it a random value from
0
toN
forindex_partition
. (Here,N
is some arbitrary constant of your choice.9
is probably an okay value to start with.) - Create a GSI with hash key of
index_partition
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Now, you only need to execute
N
queries. Use a key condition expression ofindex_partition = :n AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 2
This solution is similar to the last, but instead of using random GSI sharding, we'll use a date based partition for the GSI.
Steps:
- Add a new string attribute to items that you write to your table. Let's call it
ts_ymd
. - When you write a new item to your table, use just the
yyyy-mm-dd
part ofts
to set the value ofts_ymd
. (You could use any granularity you like. It depends on your typical query range forts
. If:val1
and:val2
are typically only an hour apart from each other, then a suitable GSI partition key could be yyyy-mm-dd-hh.) - Create a GSI with hash key of
ts_ymd
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Assuming you went with yyyy-mm-dd for your GSI partition key, you only need to execute one query for every day that is within
:val1
and:val2
. Use a key condition expression ofts_ymd = :ymd AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 3
I don't know how many different values of apiAction
there are and how those values are distributed, but if there are more than a few, and they have approximately equal distribution, you could partition a GSI based on that value. The more possible values you have for apiAction
, the better this solution is for you. The limiting factor here is that you need to have enough values that you won't run into the 10GB partition limit for your GSI.
Steps:
- Create a GSI with hash key of
apiAction
and a sort key ofts
. You will need to projectacc_token
to the GSI. - You only need to execute one query. Use a key condition expression of
apiAction = :status AND ts between :val1 and :val2" and a filter expression of
acc_token in :acc_token_list`.
For all of these solutions, you should consider how evenly the GSI partition key will be distributed, and the size of the typical range for ts
in your query. You must use a filter expression on acc_token
, so you should try to pick a solution that minimizes the total number of items the will match your key condition expression, but at the same time, you need to be aware that you can't have more than 10GB of data for one partition key (for the table or for a GSI). You also need to remember that a GSI can only be queried as an eventually consistent read.
But I have close to 200 items in my array.and the number may increase in future.I think that is not a correct approach to query 200+ times.Please suggest any other way if I can do this
– Test Mail
Nov 21 at 21:20
Are these 200 keys always the same?
– Matthew Pope
Nov 21 at 21:23
Or would it be acceptable to query without thebetween
function? If that’s okay, or if you’re okay with using filter expressions, then a solution is possible using a Global Secondary Index.
– Matthew Pope
Nov 21 at 21:32
Thanks for your reply.Yes certainly that 200 keys are always same.But new keys getting added over the time.Unfortunately the developers who have done initial development did not create any indexes and now it became close to one million.is there any other way I can alter now after creating indexes or do dynamodb have any other feature to copy table to another table within the region?So that I can do this experiments on new table instead of doing it in production data.
– Test Mail
Nov 22 at 4:11
.I know we can use data pipeline and s3 but with out using any other service can we do copy in dynamo it self to save cost?please advice
– Test Mail
Nov 22 at 4:28
|
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
No, it is not possible. A single query may search only one specific hash key value. (See DynamoDB – Query.)
You can, however, execute multiple queries in parallel, which will have the effect you desire.
Edit (2018-11-21)
Since you said there are 200+ hash keys that you are looking for, here are two possible solutions. These solutions do not require unbounded, parallel calls to DynamoDB, but they will cost you more RCU. They may be faster or slower, depending on the distribution of data in your table.
I don't know the distribution of your data, so I can't say which one is best for you. In all cases, we can't use acc_token
as the sort key of the GSI because you can't use the IN
operator in a KeyConditionExpression. (See DynamoDB – Condition.)
Solution 1
This strategy is based on Global Secondary Index Write Sharding for Selective Table Queries
Steps:
- Add a new attribute to items that you write to your table. This new attribute can be a number or string. Let's call it
index_partition
. - When you write a new item to your table, give it a random value from
0
toN
forindex_partition
. (Here,N
is some arbitrary constant of your choice.9
is probably an okay value to start with.) - Create a GSI with hash key of
index_partition
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Now, you only need to execute
N
queries. Use a key condition expression ofindex_partition = :n AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 2
This solution is similar to the last, but instead of using random GSI sharding, we'll use a date based partition for the GSI.
Steps:
- Add a new string attribute to items that you write to your table. Let's call it
ts_ymd
. - When you write a new item to your table, use just the
yyyy-mm-dd
part ofts
to set the value ofts_ymd
. (You could use any granularity you like. It depends on your typical query range forts
. If:val1
and:val2
are typically only an hour apart from each other, then a suitable GSI partition key could be yyyy-mm-dd-hh.) - Create a GSI with hash key of
ts_ymd
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Assuming you went with yyyy-mm-dd for your GSI partition key, you only need to execute one query for every day that is within
:val1
and:val2
. Use a key condition expression ofts_ymd = :ymd AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 3
I don't know how many different values of apiAction
there are and how those values are distributed, but if there are more than a few, and they have approximately equal distribution, you could partition a GSI based on that value. The more possible values you have for apiAction
, the better this solution is for you. The limiting factor here is that you need to have enough values that you won't run into the 10GB partition limit for your GSI.
Steps:
- Create a GSI with hash key of
apiAction
and a sort key ofts
. You will need to projectacc_token
to the GSI. - You only need to execute one query. Use a key condition expression of
apiAction = :status AND ts between :val1 and :val2" and a filter expression of
acc_token in :acc_token_list`.
For all of these solutions, you should consider how evenly the GSI partition key will be distributed, and the size of the typical range for ts
in your query. You must use a filter expression on acc_token
, so you should try to pick a solution that minimizes the total number of items the will match your key condition expression, but at the same time, you need to be aware that you can't have more than 10GB of data for one partition key (for the table or for a GSI). You also need to remember that a GSI can only be queried as an eventually consistent read.
But I have close to 200 items in my array.and the number may increase in future.I think that is not a correct approach to query 200+ times.Please suggest any other way if I can do this
– Test Mail
Nov 21 at 21:20
Are these 200 keys always the same?
– Matthew Pope
Nov 21 at 21:23
Or would it be acceptable to query without thebetween
function? If that’s okay, or if you’re okay with using filter expressions, then a solution is possible using a Global Secondary Index.
– Matthew Pope
Nov 21 at 21:32
Thanks for your reply.Yes certainly that 200 keys are always same.But new keys getting added over the time.Unfortunately the developers who have done initial development did not create any indexes and now it became close to one million.is there any other way I can alter now after creating indexes or do dynamodb have any other feature to copy table to another table within the region?So that I can do this experiments on new table instead of doing it in production data.
– Test Mail
Nov 22 at 4:11
.I know we can use data pipeline and s3 but with out using any other service can we do copy in dynamo it self to save cost?please advice
– Test Mail
Nov 22 at 4:28
|
show 2 more comments
up vote
0
down vote
No, it is not possible. A single query may search only one specific hash key value. (See DynamoDB – Query.)
You can, however, execute multiple queries in parallel, which will have the effect you desire.
Edit (2018-11-21)
Since you said there are 200+ hash keys that you are looking for, here are two possible solutions. These solutions do not require unbounded, parallel calls to DynamoDB, but they will cost you more RCU. They may be faster or slower, depending on the distribution of data in your table.
I don't know the distribution of your data, so I can't say which one is best for you. In all cases, we can't use acc_token
as the sort key of the GSI because you can't use the IN
operator in a KeyConditionExpression. (See DynamoDB – Condition.)
Solution 1
This strategy is based on Global Secondary Index Write Sharding for Selective Table Queries
Steps:
- Add a new attribute to items that you write to your table. This new attribute can be a number or string. Let's call it
index_partition
. - When you write a new item to your table, give it a random value from
0
toN
forindex_partition
. (Here,N
is some arbitrary constant of your choice.9
is probably an okay value to start with.) - Create a GSI with hash key of
index_partition
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Now, you only need to execute
N
queries. Use a key condition expression ofindex_partition = :n AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 2
This solution is similar to the last, but instead of using random GSI sharding, we'll use a date based partition for the GSI.
Steps:
- Add a new string attribute to items that you write to your table. Let's call it
ts_ymd
. - When you write a new item to your table, use just the
yyyy-mm-dd
part ofts
to set the value ofts_ymd
. (You could use any granularity you like. It depends on your typical query range forts
. If:val1
and:val2
are typically only an hour apart from each other, then a suitable GSI partition key could be yyyy-mm-dd-hh.) - Create a GSI with hash key of
ts_ymd
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Assuming you went with yyyy-mm-dd for your GSI partition key, you only need to execute one query for every day that is within
:val1
and:val2
. Use a key condition expression ofts_ymd = :ymd AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 3
I don't know how many different values of apiAction
there are and how those values are distributed, but if there are more than a few, and they have approximately equal distribution, you could partition a GSI based on that value. The more possible values you have for apiAction
, the better this solution is for you. The limiting factor here is that you need to have enough values that you won't run into the 10GB partition limit for your GSI.
Steps:
- Create a GSI with hash key of
apiAction
and a sort key ofts
. You will need to projectacc_token
to the GSI. - You only need to execute one query. Use a key condition expression of
apiAction = :status AND ts between :val1 and :val2" and a filter expression of
acc_token in :acc_token_list`.
For all of these solutions, you should consider how evenly the GSI partition key will be distributed, and the size of the typical range for ts
in your query. You must use a filter expression on acc_token
, so you should try to pick a solution that minimizes the total number of items the will match your key condition expression, but at the same time, you need to be aware that you can't have more than 10GB of data for one partition key (for the table or for a GSI). You also need to remember that a GSI can only be queried as an eventually consistent read.
But I have close to 200 items in my array.and the number may increase in future.I think that is not a correct approach to query 200+ times.Please suggest any other way if I can do this
– Test Mail
Nov 21 at 21:20
Are these 200 keys always the same?
– Matthew Pope
Nov 21 at 21:23
Or would it be acceptable to query without thebetween
function? If that’s okay, or if you’re okay with using filter expressions, then a solution is possible using a Global Secondary Index.
– Matthew Pope
Nov 21 at 21:32
Thanks for your reply.Yes certainly that 200 keys are always same.But new keys getting added over the time.Unfortunately the developers who have done initial development did not create any indexes and now it became close to one million.is there any other way I can alter now after creating indexes or do dynamodb have any other feature to copy table to another table within the region?So that I can do this experiments on new table instead of doing it in production data.
– Test Mail
Nov 22 at 4:11
.I know we can use data pipeline and s3 but with out using any other service can we do copy in dynamo it self to save cost?please advice
– Test Mail
Nov 22 at 4:28
|
show 2 more comments
up vote
0
down vote
up vote
0
down vote
No, it is not possible. A single query may search only one specific hash key value. (See DynamoDB – Query.)
You can, however, execute multiple queries in parallel, which will have the effect you desire.
Edit (2018-11-21)
Since you said there are 200+ hash keys that you are looking for, here are two possible solutions. These solutions do not require unbounded, parallel calls to DynamoDB, but they will cost you more RCU. They may be faster or slower, depending on the distribution of data in your table.
I don't know the distribution of your data, so I can't say which one is best for you. In all cases, we can't use acc_token
as the sort key of the GSI because you can't use the IN
operator in a KeyConditionExpression. (See DynamoDB – Condition.)
Solution 1
This strategy is based on Global Secondary Index Write Sharding for Selective Table Queries
Steps:
- Add a new attribute to items that you write to your table. This new attribute can be a number or string. Let's call it
index_partition
. - When you write a new item to your table, give it a random value from
0
toN
forindex_partition
. (Here,N
is some arbitrary constant of your choice.9
is probably an okay value to start with.) - Create a GSI with hash key of
index_partition
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Now, you only need to execute
N
queries. Use a key condition expression ofindex_partition = :n AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 2
This solution is similar to the last, but instead of using random GSI sharding, we'll use a date based partition for the GSI.
Steps:
- Add a new string attribute to items that you write to your table. Let's call it
ts_ymd
. - When you write a new item to your table, use just the
yyyy-mm-dd
part ofts
to set the value ofts_ymd
. (You could use any granularity you like. It depends on your typical query range forts
. If:val1
and:val2
are typically only an hour apart from each other, then a suitable GSI partition key could be yyyy-mm-dd-hh.) - Create a GSI with hash key of
ts_ymd
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Assuming you went with yyyy-mm-dd for your GSI partition key, you only need to execute one query for every day that is within
:val1
and:val2
. Use a key condition expression ofts_ymd = :ymd AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 3
I don't know how many different values of apiAction
there are and how those values are distributed, but if there are more than a few, and they have approximately equal distribution, you could partition a GSI based on that value. The more possible values you have for apiAction
, the better this solution is for you. The limiting factor here is that you need to have enough values that you won't run into the 10GB partition limit for your GSI.
Steps:
- Create a GSI with hash key of
apiAction
and a sort key ofts
. You will need to projectacc_token
to the GSI. - You only need to execute one query. Use a key condition expression of
apiAction = :status AND ts between :val1 and :val2" and a filter expression of
acc_token in :acc_token_list`.
For all of these solutions, you should consider how evenly the GSI partition key will be distributed, and the size of the typical range for ts
in your query. You must use a filter expression on acc_token
, so you should try to pick a solution that minimizes the total number of items the will match your key condition expression, but at the same time, you need to be aware that you can't have more than 10GB of data for one partition key (for the table or for a GSI). You also need to remember that a GSI can only be queried as an eventually consistent read.
No, it is not possible. A single query may search only one specific hash key value. (See DynamoDB – Query.)
You can, however, execute multiple queries in parallel, which will have the effect you desire.
Edit (2018-11-21)
Since you said there are 200+ hash keys that you are looking for, here are two possible solutions. These solutions do not require unbounded, parallel calls to DynamoDB, but they will cost you more RCU. They may be faster or slower, depending on the distribution of data in your table.
I don't know the distribution of your data, so I can't say which one is best for you. In all cases, we can't use acc_token
as the sort key of the GSI because you can't use the IN
operator in a KeyConditionExpression. (See DynamoDB – Condition.)
Solution 1
This strategy is based on Global Secondary Index Write Sharding for Selective Table Queries
Steps:
- Add a new attribute to items that you write to your table. This new attribute can be a number or string. Let's call it
index_partition
. - When you write a new item to your table, give it a random value from
0
toN
forindex_partition
. (Here,N
is some arbitrary constant of your choice.9
is probably an okay value to start with.) - Create a GSI with hash key of
index_partition
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Now, you only need to execute
N
queries. Use a key condition expression ofindex_partition = :n AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 2
This solution is similar to the last, but instead of using random GSI sharding, we'll use a date based partition for the GSI.
Steps:
- Add a new string attribute to items that you write to your table. Let's call it
ts_ymd
. - When you write a new item to your table, use just the
yyyy-mm-dd
part ofts
to set the value ofts_ymd
. (You could use any granularity you like. It depends on your typical query range forts
. If:val1
and:val2
are typically only an hour apart from each other, then a suitable GSI partition key could be yyyy-mm-dd-hh.) - Create a GSI with hash key of
ts_ymd
and a sort key ofts
. You will need to projectapiAction
andacc_token
to the GSI. - Assuming you went with yyyy-mm-dd for your GSI partition key, you only need to execute one query for every day that is within
:val1
and:val2
. Use a key condition expression ofts_ymd = :ymd AND ts between :val1 and :val2
and a filter expression ofapiAction = :status AND acc_token in :acc_token_list
Solution 3
I don't know how many different values of apiAction
there are and how those values are distributed, but if there are more than a few, and they have approximately equal distribution, you could partition a GSI based on that value. The more possible values you have for apiAction
, the better this solution is for you. The limiting factor here is that you need to have enough values that you won't run into the 10GB partition limit for your GSI.
Steps:
- Create a GSI with hash key of
apiAction
and a sort key ofts
. You will need to projectacc_token
to the GSI. - You only need to execute one query. Use a key condition expression of
apiAction = :status AND ts between :val1 and :val2" and a filter expression of
acc_token in :acc_token_list`.
For all of these solutions, you should consider how evenly the GSI partition key will be distributed, and the size of the typical range for ts
in your query. You must use a filter expression on acc_token
, so you should try to pick a solution that minimizes the total number of items the will match your key condition expression, but at the same time, you need to be aware that you can't have more than 10GB of data for one partition key (for the table or for a GSI). You also need to remember that a GSI can only be queried as an eventually consistent read.
edited Nov 21 at 22:20
answered Nov 21 at 19:51
Matthew Pope
1,085512
1,085512
But I have close to 200 items in my array.and the number may increase in future.I think that is not a correct approach to query 200+ times.Please suggest any other way if I can do this
– Test Mail
Nov 21 at 21:20
Are these 200 keys always the same?
– Matthew Pope
Nov 21 at 21:23
Or would it be acceptable to query without thebetween
function? If that’s okay, or if you’re okay with using filter expressions, then a solution is possible using a Global Secondary Index.
– Matthew Pope
Nov 21 at 21:32
Thanks for your reply.Yes certainly that 200 keys are always same.But new keys getting added over the time.Unfortunately the developers who have done initial development did not create any indexes and now it became close to one million.is there any other way I can alter now after creating indexes or do dynamodb have any other feature to copy table to another table within the region?So that I can do this experiments on new table instead of doing it in production data.
– Test Mail
Nov 22 at 4:11
.I know we can use data pipeline and s3 but with out using any other service can we do copy in dynamo it self to save cost?please advice
– Test Mail
Nov 22 at 4:28
|
show 2 more comments
But I have close to 200 items in my array.and the number may increase in future.I think that is not a correct approach to query 200+ times.Please suggest any other way if I can do this
– Test Mail
Nov 21 at 21:20
Are these 200 keys always the same?
– Matthew Pope
Nov 21 at 21:23
Or would it be acceptable to query without thebetween
function? If that’s okay, or if you’re okay with using filter expressions, then a solution is possible using a Global Secondary Index.
– Matthew Pope
Nov 21 at 21:32
Thanks for your reply.Yes certainly that 200 keys are always same.But new keys getting added over the time.Unfortunately the developers who have done initial development did not create any indexes and now it became close to one million.is there any other way I can alter now after creating indexes or do dynamodb have any other feature to copy table to another table within the region?So that I can do this experiments on new table instead of doing it in production data.
– Test Mail
Nov 22 at 4:11
.I know we can use data pipeline and s3 but with out using any other service can we do copy in dynamo it self to save cost?please advice
– Test Mail
Nov 22 at 4:28
But I have close to 200 items in my array.and the number may increase in future.I think that is not a correct approach to query 200+ times.Please suggest any other way if I can do this
– Test Mail
Nov 21 at 21:20
But I have close to 200 items in my array.and the number may increase in future.I think that is not a correct approach to query 200+ times.Please suggest any other way if I can do this
– Test Mail
Nov 21 at 21:20
Are these 200 keys always the same?
– Matthew Pope
Nov 21 at 21:23
Are these 200 keys always the same?
– Matthew Pope
Nov 21 at 21:23
Or would it be acceptable to query without the
between
function? If that’s okay, or if you’re okay with using filter expressions, then a solution is possible using a Global Secondary Index.– Matthew Pope
Nov 21 at 21:32
Or would it be acceptable to query without the
between
function? If that’s okay, or if you’re okay with using filter expressions, then a solution is possible using a Global Secondary Index.– Matthew Pope
Nov 21 at 21:32
Thanks for your reply.Yes certainly that 200 keys are always same.But new keys getting added over the time.Unfortunately the developers who have done initial development did not create any indexes and now it became close to one million.is there any other way I can alter now after creating indexes or do dynamodb have any other feature to copy table to another table within the region?So that I can do this experiments on new table instead of doing it in production data.
– Test Mail
Nov 22 at 4:11
Thanks for your reply.Yes certainly that 200 keys are always same.But new keys getting added over the time.Unfortunately the developers who have done initial development did not create any indexes and now it became close to one million.is there any other way I can alter now after creating indexes or do dynamodb have any other feature to copy table to another table within the region?So that I can do this experiments on new table instead of doing it in production data.
– Test Mail
Nov 22 at 4:11
.I know we can use data pipeline and s3 but with out using any other service can we do copy in dynamo it self to save cost?please advice
– Test Mail
Nov 22 at 4:28
.I know we can use data pipeline and s3 but with out using any other service can we do copy in dynamo it self to save cost?please advice
– Test Mail
Nov 22 at 4:28
|
show 2 more comments
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53416107%2fhow-to-query-array-of-primary-key-values-in-dynamodb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown