Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: DynamoDB DQL query runner #934

Merged
merged 7 commits into from
Mar 29, 2016
Merged

Conversation

alexanderlz
Copy link
Member

Adds the ability to query DynamoDB using SQL!
(with the help of the following library
https://github.com/mathcamp/dql
)

@@ -66,6 +66,9 @@ def default(self, o):
if isinstance(o, datetime.timedelta):
return str(o)

if isinstance(o, unicode):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? 😮

@@ -19,7 +19,8 @@ python-dateutil==2.4.2
pytz==2015.7
redis==2.7.5
requests==2.3.0
six==1.5.2
botocore==1.4.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to update the six lib (to 1.10.0), to be compatible with dql

@arikfr arikfr changed the title DynamoDB SQL query runner Feature: DynamoDB SQL query runner Mar 29, 2016
@arikfr arikfr changed the title Feature: DynamoDB SQL query runner Feature: DynamoDB DQL query runner Mar 29, 2016
@arikfr arikfr merged commit d83dfc9 into getredash:master Mar 29, 2016
@arikfr
Copy link
Member

arikfr commented Mar 29, 2016

Thanks!

@mvolpato
Copy link

Can you please give an explanation of the fields used by DynamoDB connection? Some are clear to me (Access_key, Secret_key, Region), the others are not.

I get this error:

Error running query: InvalidSignatureException: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. The Canonical String for this request should have been 'POST / content-type:application/x-amz-json-1.0 host:dynamodb.eu-west-1.amazonaws.com user-agent:Botocore/1.4.4 Python/2.7.11 Linux/3.13.0-85-generic x-amz-date:20160516T194838Z x-amz-target:DynamoDB_20120810.DescribeTable content-type;host;user-agent;x-amz-date;x-amz-target [hash here]' The String-to-Sign should have been 'AWS4-HMAC-SHA256 20160516T194838Z 20160516/eu-west-1/dynamodb/aws4_request [hash here]' Args: {'TableName': 'tablename'}

I used dynamodb.eu-west-1.amazonaws.com as Host, is_secore false, Port 80 (or 8000), Region eu-west-1.

@alexanderlz
Copy link
Member Author

Hi @mvolpato,
Which boto3 version are you using?

@mvolpato
Copy link

Hi @alexanderlz
No idea. I simply used the container provided by Bitnami on AWS.

@arikfr
Copy link
Member

arikfr commented May 17, 2016

@mvolpato see #1059. It's a bug. Once #1059 is merged, just create a new DynamoDB data source without specifying host.

@mvolpato
Copy link

Thank you @arikfr. Looking forward for the release.

dairyo pushed a commit to KiiCorp/redash that referenced this pull request Mar 1, 2019
Feature: DynamoDB DQL query runner
washort pushed a commit to washort/redash that referenced this pull request Jun 5, 2019
* Process extra column metadata for a few sql-based data sources.

* Add Table and Column metadata tables.

* Periodically update table and column schema tables in a celery task.

* Fetching schema returns data from table and column metadata tables.

* Add tests for backend changes.

* Front-end shows extra table metadata and uses new schema response.

* Delete datasource schema data when deleting a data source.

* Process and store data source schema when a data source is first created or after a migration.

* Tables should have a unique name per datasource.

* Addressing review comments.

* Update migration file for mixins.

* Appease PEP8

* Upgrade migration file for rebase.

* Cascade delete.

* Adding org_id

* Remove redundant column and table prefixes.

* Non-existing tables and columns should be filtered out on the server side not client side.

* Fetching table samples should be optional and should happen in a separate task per table.

* Allow users to force a schema refresh.

* Use updated_at to help prune old schema metadata periodically.

* Using settings.SCHEMAS_REFRESH_QUEUE

* fix for getredash#2426 test

* more stable test_interactive_new

* Closes getredash#927, getredash#928: Schema refresh improvements.

* Closes getredash#934, getredash#935: Remove type from schema browser and don't show empty example column in schema drawer (getredash#936)

* Speed up schema fetch requests with fewer postgres queries.

* Add column metadata to Athena glue processing.

* Fix bug assuming 'metadata' exists for every table.

* Closes getredash#939: Persisted, existing table metadata should be updated.

* Sample processing should be rate-limited.

* Add cli command for refreshing data samples.

* Schema refreshes should not overwrite column 'example' field.

* refresh_samples() should filter tables_to_sample on the datasource's id being sampled

* Correctly wrap long text in schema drawer.

Co-authored-by: Alison <github@bankofknowledge.net>
washort pushed a commit to washort/redash that referenced this pull request Jun 12, 2019
* Process extra column metadata for a few sql-based data sources.

* Add Table and Column metadata tables.

* Periodically update table and column schema tables in a celery task.

* Fetching schema returns data from table and column metadata tables.

* Add tests for backend changes.

* Front-end shows extra table metadata and uses new schema response.

* Delete datasource schema data when deleting a data source.

* Process and store data source schema when a data source is first created or after a migration.

* Tables should have a unique name per datasource.

* Addressing review comments.

* Update migration file for mixins.

* Appease PEP8

* Upgrade migration file for rebase.

* Cascade delete.

* Adding org_id

* Remove redundant column and table prefixes.

* Non-existing tables and columns should be filtered out on the server side not client side.

* Fetching table samples should be optional and should happen in a separate task per table.

* Allow users to force a schema refresh.

* Use updated_at to help prune old schema metadata periodically.

* Using settings.SCHEMAS_REFRESH_QUEUE

* fix for getredash#2426 test

* more stable test_interactive_new

* Closes getredash#927, getredash#928: Schema refresh improvements.

* Closes getredash#934, getredash#935: Remove type from schema browser and don't show empty example column in schema drawer (getredash#936)

* Speed up schema fetch requests with fewer postgres queries.

* Add column metadata to Athena glue processing.

* Fix bug assuming 'metadata' exists for every table.

* Closes getredash#939: Persisted, existing table metadata should be updated.

* Sample processing should be rate-limited.

* Add cli command for refreshing data samples.

* Schema refreshes should not overwrite column 'example' field.

* refresh_samples() should filter tables_to_sample on the datasource's id being sampled

* Correctly wrap long text in schema drawer.

Co-authored-by: Alison <github@bankofknowledge.net>
washort pushed a commit to washort/redash that referenced this pull request Jun 13, 2019
* Process extra column metadata for a few sql-based data sources.

* Add Table and Column metadata tables.

* Periodically update table and column schema tables in a celery task.

* Fetching schema returns data from table and column metadata tables.

* Add tests for backend changes.

* Front-end shows extra table metadata and uses new schema response.

* Delete datasource schema data when deleting a data source.

* Process and store data source schema when a data source is first created or after a migration.

* Tables should have a unique name per datasource.

* Addressing review comments.

* Update migration file for mixins.

* Appease PEP8

* Upgrade migration file for rebase.

* Cascade delete.

* Adding org_id

* Remove redundant column and table prefixes.

* Non-existing tables and columns should be filtered out on the server side not client side.

* Fetching table samples should be optional and should happen in a separate task per table.

* Allow users to force a schema refresh.

* Use updated_at to help prune old schema metadata periodically.

* Using settings.SCHEMAS_REFRESH_QUEUE

* fix for getredash#2426 test

* more stable test_interactive_new

* Closes getredash#927, getredash#928: Schema refresh improvements.

* Closes getredash#934, getredash#935: Remove type from schema browser and don't show empty example column in schema drawer (getredash#936)

* Speed up schema fetch requests with fewer postgres queries.

* Add column metadata to Athena glue processing.

* Fix bug assuming 'metadata' exists for every table.

* Closes getredash#939: Persisted, existing table metadata should be updated.

* Sample processing should be rate-limited.

* Add cli command for refreshing data samples.

* Schema refreshes should not overwrite column 'example' field.

* refresh_samples() should filter tables_to_sample on the datasource's id being sampled

* Correctly wrap long text in schema drawer.

Co-authored-by: Alison <github@bankofknowledge.net>
mnoorenberghe pushed a commit to mnoorenberghe/redash that referenced this pull request Apr 17, 2020
* Process extra column metadata for a few sql-based data sources.

* Add Table and Column metadata tables.

* Periodically update table and column schema tables in a celery task.

* Fetching schema returns data from table and column metadata tables.

* Add tests for backend changes.

* Front-end shows extra table metadata and uses new schema response.

* Delete datasource schema data when deleting a data source.

* Process and store data source schema when a data source is first created or after a migration.

* Tables should have a unique name per datasource.

* Addressing review comments.

* Update migration file for mixins.

* Appease PEP8

* Upgrade migration file for rebase.

* Cascade delete.

* Adding org_id

* Remove redundant column and table prefixes.

* Non-existing tables and columns should be filtered out on the server side not client side.

* Fetching table samples should be optional and should happen in a separate task per table.

* Allow users to force a schema refresh.

* Use updated_at to help prune old schema metadata periodically.

* Using settings.SCHEMAS_REFRESH_QUEUE

* fix for getredash#2426 test

* more stable test_interactive_new

* Closes getredash#927, getredash#928: Schema refresh improvements.

* Closes getredash#934, getredash#935: Remove type from schema browser and don't show empty example column in schema drawer (getredash#936)

* Speed up schema fetch requests with fewer postgres queries.

* Add column metadata to Athena glue processing.

* Fix bug assuming 'metadata' exists for every table.

* Closes getredash#939: Persisted, existing table metadata should be updated.

* Sample processing should be rate-limited.

* Add cli command for refreshing data samples.

* Schema refreshes should not overwrite column 'example' field.

* refresh_samples() should filter tables_to_sample on the datasource's id being sampled

* Correctly wrap long text in schema drawer.

Schema Improvements Part 2: Add data source config options.

Adding BigQuery schema drawer with data types and samples.

Add empty migration to replace the removed schedule_until migration

Add merge migration.

Co-authored-by: Alison <github@bankofknowledge.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants