Skip to main content

Create a sample data set from a large CSV file on Amazon S3.

Project description

This utility allows you to extsact sample lines from a CSV hosted on Amazon S3.
The use case is that you have a really large CSV on S3 that you want to look at,
but you do not want to download the entire file.

What it does is grab random bytes from the key and assemble unbroken lines from
the file to create as sample.

The use case is for determining a file format, file contents, etc. See the
cognoscenti project for an example. (Um, this doesn't exist yet. Check back later.)

_Usage: sample.py [OPTIONS]_

Options:
--bucket TEXT bucket name
--key TEXT key name
--headers / --no-headers Include headers in output. Defaults to include.
-d, --delimiter TEXT File delimiter. Defaults to ','
-l, --lines INTEGER How many sample lines do you want? Defaults to 1000.
--help Show this message and exit.

Allows you to indicate the number of lines you hope to recieve. It will
grab 1000 lines by default.

#### Installing

You can install via pip:

pip install sample-s3

#### Example

ss3 --bucket foo --key path/to/bar.csv > sample_file.csv

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sample-s3-0.0.4.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file sample-s3-0.0.4.tar.gz.

File metadata

  • Download URL: sample-s3-0.0.4.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sample-s3-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c32417f7a9ff233dc922cb22790e74f25dc282290b710328938b215ef7a2de65
MD5 d9555bde59033e82893a23e3ddc1d07c
BLAKE2b-256 95fbede7f0cc7844c683f5f00a71252426fe6f2f4090f8b555d0660144501deb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page