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
Add support for MAXFILESIZE option in UNLOAD #123
Comments
I wanted to implement this but then, what would the API look like? The syntax is Choices:
|
what sort of MB are these? MiB or MB? |
Docs don't specify. Probably MiB, but would have to test. |
once someone has found out, I think this should accept bytes and convert to "MB" |
I don't think a bytes-level API is ideal, makes it a little impractical to use :/ |
@jleclanche bytes is perfect, then people can multiply using our own flags, or their own: class Size(enum.IntEnum):
MiB = 2**20
MB = 10**6
GiB = 2**30
GB = 10**9
UnloadFromSelect(max_file_size=123 * Size.MB) // can use our flags
UnloadFromSelect(max_file_size=123_000_000) // can use fancy new _ numbers
UnloadFromSelect(max_file_size=123 * 1024 * 1024) // can use their own multiplies |
The UNLOAD command now has a very useful MAXFILESIZE option to control the maximum size of the produced files. The
UnloadFromSelect
construct in the dialect should have support for that.http://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html
The text was updated successfully, but these errors were encountered: