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

Scanning sample ranges for preview #27

Open
dtabacco opened this issue Mar 6, 2017 · 1 comment
Open

Scanning sample ranges for preview #27

dtabacco opened this issue Mar 6, 2017 · 1 comment

Comments

@dtabacco
Copy link

dtabacco commented Mar 6, 2017

I looked through the scanner options and I couldn't figure out a way to just ask accumulo to scan the "first 10 rows" of a table. I am trying to create a preview mode for a table, assuming the user has no knowledge of the key design. The scan ranges seem to imply I need to already know and provide a key range.

Is there a better way to do this?

@jatrost
Copy link
Collaborator

jatrost commented Mar 7, 2017

Try this

conn.scan(table)[:5]

Or

itertools.islice(conn.scan(table), 0, 4)

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

2 participants