User Tools

Site Tools


cloud:aws:dynamodb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cloud:aws:dynamodb [2023/07/11 14:56] skipidarcloud:aws:dynamodb [2023/11/01 07:13] (current) – ↷ Page moved from business_process_management:camunda:cloud:aws:dynamodb to cloud:aws:dynamodb skipidar
Line 1: Line 1:
 ===== Dynamo DB ===== ===== Dynamo DB =====
 +
 +=== Data ===
 +
 +The following table lists the data types you can use with PartiQL for DynamoDB.
 +
 +| Boolean | ''TRUE / FALSE'' | Not case sensitive. | 
 +| Binary | ''N/A'' | Only supported via code. | 
 +| List | ''[ value1, value2,...]'' | There are no restrictions on the data types that can be stored in a List type, and  the elements in a List do not have to be of the same type. | 
 +| Map | ''{ 'name' : value }'' | There are no restrictions on the data types that can be stored in a Map type, and  the elements in a Map do not have to be of the same type. | 
 +| Null | ''NULL'' |Not case sensitive. | 
 +| Number | ''1, 1.0, 1e0'' | Numbers can be positive, negative, or zero. Numbers can have up to 38 digits of precision. | 
 +| Number Set | ''<<number1, number2>>'' | The elements in a number set must be of type Number. | 
 +| String Set | ''<<'string1', 'string2'>>'' | The elements in a string set must be of type String. | 
 +| String | '''string value''' | Single quotes must be used to specify String values. | 
 +
 +<code>
 +INSERT INTO TypesTable value {'primarykey':'1', 
 +'NumberType':1,
 +'MapType' : {'entryname1': 'value', 'entryname2': 4}, 
 +'ListType': [1,'stringval'], 
 +'NumberSetType':<<1,34,32,4.5>>, 
 +'StringSetType':<<'stringval','stringval2'>>
 +}
 +</code>
 +
  
 === Indexing === === Indexing ===
Line 40: Line 65:
  
 {{https://s3.eu-central-1.amazonaws.com/alf-digital-wiki-pics/sharex/JHdZJlc0q5.png}} {{https://s3.eu-central-1.amazonaws.com/alf-digital-wiki-pics/sharex/JHdZJlc0q5.png}}
 +</WRAP>|
 +| Sparse index |<WRAP> 
 +Sparse Index is a **special type of GSI** that allows you to **index only a subset of the collection** by **indexing an attribute that is not present on all** the items. 
 +
 +This technique is useful to **quickly query for a set of items that have a specific attribute value**, e.g. only rows that have an attribute deletedAt defined. 
 +
 +To create a sparse index, make sure that **only items that should be in that index** - **have a value** of that index-sort-key  present.
 +
 +{{https://s3.eu-central-1.amazonaws.com/alf-digital-wiki-pics/sharex/rcf4u5eUyL.png?350}}
 +</WRAP>|
 +| Inverted index |<WRAP> 
 +Inverted Index is a GSI that is basically a primary key but inversed - table's hash key becomes inverted index's sort key and table's sort key becomes inverted index's hash key.
 +
 +{{https://s3.eu-central-1.amazonaws.com/alf-digital-wiki-pics/sharex/rhvP4HFkPX.png?350}}
 </WRAP>| </WRAP>|
  
Line 61: Line 100:
 |Local secondary index|Value| |Local secondary index|Value|
 |Term|Value| |Term|Value|
 +
 +
 +=== Query vs Scan ===
 +
 +https://dynobase.dev/dynamodb-scan-vs-query/
 +
 +{{https://dynobase.dev/dynamodb-scan-vs-query/}}
  
cloud/aws/dynamodb.1689087396.txt.gz · Last modified: by skipidar