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

Allow data samples to be gathered for partitioned tables. #966

Open
emtwo opened this issue Jun 10, 2019 · 1 comment
Open

Allow data samples to be gathered for partitioned tables. #966

emtwo opened this issue Jun 10, 2019 · 1 comment

Comments

@emtwo
Copy link

emtwo commented Jun 10, 2019

For the schema introspection, a simple query of the form SELECT * FROM {table} TABLESAMPLE SYSTEM (1) LIMIT 1 is used to get data samples. This doesn't work for all tables since some tables with partitions, for example, require that a WHERE clause is added based on the partition to narrow down the data scanned.

One proposal for handling this is to add it to the data source admin table as a column that can be modified to add a custom sample query

@emtwo
Copy link
Author

emtwo commented Sep 23, 2019

Discussion here about how to handle getting samples for partitioned tables: mozilla/redash-stmo#53

In this case, we won't need to have this "custom queries" feature but just to handle queries for partitioned tables.

@emtwo emtwo changed the title Allow custom queries to be added and used for gathering data samples Allow data samples to be gathered for partitioned tables. Sep 23, 2019
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

No branches or pull requests

1 participant