DynamoDB Count Query


#1

Hello Community!

Looking for a quick bit of advice on how to perform a count query from DynamoDB and visualize the number of records. e.g. 3,879

Tried the following:

SCAN COUNT(*)
FROM TABLE

But receive the following error after #50 seconds: Error running query: ‘str’ object has no attribute ‘iteritems’

SCAN COUNT(*)
FROM TABLE
WHERE ITEM = ‘MyItem’

But receive the following error: Error running query: ‘str’ object has no attribute ‘iteritems’

SELECT COUNT(*)
FROM TABLE
WHERE ITEM = ‘MyItem’

But receive the following error: Error running query: No index found for query. Please use a SCAN query, or set allow_select_scan=True opt allow_select_scan true

I already have a query which displays the number of rows for the query, can I obtain that number and display as a visualization?

Any assistance is appreciated!

Oh, i’m using an AWS AMI v0.11.1+b2095.

Thanks,

Scott


#2

Can you add the relevant log with the full stacktrace from /opt/redash/logs/celery_error.log?


#3

Hi Scothk,

Have you figured out a way to do this yet? I’m trying to run simple “select x, count(x) from [database]” sql-like queries on a Dynamo DB table but I keep getting the Error running query: Error parsing query at line 2 (column 6): count(date_requested) as counts, error.

I’ve checked the celery logs but can’t find anything related to the query that I ran.


#4

Thanks to @kopanitsa, there is a fix to support count queries in the next release.