Package: dql
DQLBuild:Documentation:http://dql.readthedocs.org/Downloads:http://pypi.python.org/pypi/dqlSource:https://github.com/stevearc/dqlA simple, SQL-ish language for DynamoDBAs of November 2020, Amazon has releasedPartiQL
supportfor DynamoDB. You should investigate that first to see if it addresses your
needs.Getting StartedInstallation can be done in a variety of waysAn executablepexfile is available onthe release page.You can run a script to generate the pex file yourself:curl-o-install.pyhttps://raw.githubusercontent.com/stevearc/dql/master/bin/install.py| pythonWith pip:pip install dqlExamplesHere are some basic DQL examples to get you going:Start the REPL:$ dql
us-west-1>Creating a table:us-west-1> CREATE TABLE forum_threads (name STRING HASH KEY,
         >                             subject STRING RANGE KEY,
         >                             THROUGHPUT (4, 2));Inserting data:us-west-1> INSERT INTO forum_threads (name, subject, views, replies)
         > VALUES ('Self Defense', 'Defense from Banana', 67, 4),
         > ('Self Defense', 'Defense from Strawberry', 10, 0),
         > ('Cheese Shop', 'Anyone seen the camembert?', 16, 1);Queries:us-west-1> SCAN * FROM forum_threads;
us-west-1> SELECT count(*) FROM forum_threads WHERE name = 'Self Defense';
us-west-1> SELECT * FROM forum_threads WHERE name = 'Self Defense';Mutations:us-west-1> UPDATE forum_threads ADD views 1 WHERE
         > name = 'Self Defense' AND subject = 'Defense from Banana';
us-west-1> DELETE FROM forum_threads WHERE name = 'Cheese Shop';Changing tables:us-west-1> ALTER TABLE forum_threads SET THROUGHPUT (8, 4);
us-west-1> DROP TABLE forum_threads;And don’t forget to usehelp!Changelog0.6.2 - UnreleasedFix: Issue with missing dependency (typing_extensions) made apparent by python 3.9Added: Run tests with python 3.9Chore: general cleanup & lint fixesChore: removing travis-ci; adding github workflowsAdded:clear&clscommands.Updated: clear, cls, exit commands are no longer tracked in history.0.6.1Feature: Retain query history across sessions. (#40)Fix: Cannot count(*) on an index (#37)Fix: Saving data to some file formats was failingFix: Constraint functions accept quoted field names (#36)Chore: Updated config for Dynamo Local to install dependency within project root.0.6.0Bug fix: Fixed ZeroDivisionError with ls on On-Demand tables (#32)Added: ls command accepts glob patterns (#30)Added: Better error handling and display. (#28)Added: Standard error handling for execution with-coption. (#28)Added: Keyboard interrupts will print spooky emojis. (#28)Added:--jsonargument for use with-cto format results as JSONChore: General Dev Env & CI updates for easier development. (#27)0.5.28Bug fix: Encoding errors for some SAVE file formats0.5.27Bug fix: Proper throttling in Python 3Dropping support for python 3.40.5.26Use python-future instead of six as compatibility libraryNow distributing a wheel packageBug fix: Confirmation prompts crash on Python 20.5.25Bug fix: Compatibility errors with Python 30.5.24Bug fix: Support key conditions where field has a-in the name0.5.23Bug fix: Default encoding error on macDropping support for python 2.60.5.22Bug fix: Can now run any CLI command using-c"command"0.5.21Bug fix: Crash fix when resizing terminal with ‘watch’ command active‘Watch’ columns will dynamically resize to fit terminal width0.5.20Bug fix: When saving to JSON floats are no longer cast to intsBug fix: Reserved words are correctly substituted when using WHERE … IN0.5.19Locked in the version of pyparsing after 2.1.5 broke compatibility again.0.5.18Bug fix: Correct name substitution/selection logicSwapped outbin/run_dql.pyforbin/install.py. Similar concept, better execution.0.5.17Bug fix: Can’t display Binary data0.5.16Bug fix: Can’t use boolean values in update statements0.5.15Gracefully handle missing imports on Windows0.5.14Missing curses library won’t cause ImportError0.5.13Fix bug where query would sometimes display ‘No Results’ even when results were found.0.5.12Differentiate LIMIT and SCAN LIMITOptions and query syntax forthrottlingthe consumed throughputCrash fixes and other small robustness improvements0.5.11SELECT <attributes> can now use full expressions0.5.10LOAD command to insert records from a file created withSELECT ... SAVEDefault SAVE format is pickleSAVE command can gzip the file0.5.9Don’t print results to console when saving to a file‘auto’ pagesize to adapt to terminal heightWhen selecting specific attributes with KEYS IN only those attributes are fetchedORDER BY queries spanning multiple pages no longer stuck on first pageColumn formatter fits column widths more intelligentlySmart formatter is smarter about switching to Expanded mode0.5.8Tab completion for Mac OS X0.5.7run_dql.pylocks in a versionDisplay output auto-detects terminal width0.5.6Format option saves properlyWHERE expressions can compare fields to fields (e.g.WHERE foo > bar)Always perform batch_get after querying/scanning an index that doesn’t project all attributes0.5.5General bug fixesSelf containedrun_dql.pyscript0.5.4Fixes forwatchdisplaySELECT can save the results to a file0.5.3ALTER commands can specify IF (NOT) EXISTSNewwatchcommand to monitor table consumed capacitiesSELECT can fetch attributes that aren’t projected onto the queried indexSELECT can ORDER BY non-range-key attributes0.5.2EXPLAIN <query> will print out the DynamoDB calls that will be made when you run the queryANALYZE <query> will run the query and print out consumed capacity information0.5.1Pretty-format non-item query return values (such as count)Disable passing AWS credentials on the command line0.5.0Breakage: New syntax for SELECT, SCAN, UPDATE, DELETEBreakage: Removed COUNT query (nowSELECTcount(*))Breakage: Removed the ability to embed python in queriesNew alternative syntax for INSERTALTER can create and drop global indexesQueries and updates now use the most recent DynamoDB expressions APIUnified options in CLI under theoptcommand0.4.1Update to maintain compatibility with new versions of botocore and dynamo3Improving CloudWatch support (which is used to get consumed table capacity)0.4.0Breakage: Dropping support for python 3.2 due to lack of botocore supportFeature: Support for JSON data types0.3.2Bug fix: Allow ‘.’ in table names of DUMP SCHEMA commandBug fix: Passing a port argument to local connection doesn’t crashBug fix: Prompt says ‘localhost’ when connected to DynamoDB local0.3.1Bug fix: Allow ‘.’ in table names0.3.0Feature: SELECT and COUNT can have FILTER clauseFeature: FILTER clause may OR constraints together0.2.1Bug fix: Crash when printing ‘COUNT’ queries0.2.0Feature: Python 3 support0.1.0First public release