Accessing a QLDB database
QLDB has three methods to query data, as follows:
- AWS console—QLDB has a built-in graphical query tool.
- Amazon QLDB shell—You can use a downloadable shell and connect from your local machine to the QLDB instance and run queries.
- AWS application programming interface (API)—You can download a QLDB driver and make calls to the QLDB instance using a variety of coding languages such as Java, .NET, and Python.
These methods all use a language called PartiQL (pronounced particle) to run queries. PartiQL uses a similar structure to SQL queries, allowing you to run SELECT
, UPDATE
, and DELETE
statements complete with WHERE
clauses. Here's an example of this:
SELECT * FROM Cars AS c WHERE c.Reg IN ('BG12 YHG', 'D150 GWE');
Here is the output for the previous query. It follows a syntax called Amazon Ion, which closely resembles JavaScript Object Notation (JSON) syntax:
{ &...