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

unload_table Macro extended to accept WHERE clause in SELECT statement #47

Open
ghost opened this issue Aug 16, 2021 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Aug 16, 2021

Describe the feature

An update to the unload_table macro that would allow a user to pass in a WHERE clause to filter specific rows within table to unload into S3. This is possible via using the Redshift UNLOAD command but limited with the macro to an entire SELECT of the table.

Describe alternatives you've considered

Alternatives is to just pass the raw SQL into a post_hook to extract the specific rows wanted rather than using the unload_table macro

Additional context

Redshift specific

Who will this benefit?

Users who want to unload a subset of the table rather than the entire table as this might not suit all use cases.

@ghost ghost added the enhancement label Aug 16, 2021
@gboro54
Copy link

gboro54 commented Aug 24, 2021

Could you not materialize a view with the correct filtering and then run the unload macro? I do agree the where clause would be useful but this would probably be a workaround and allow you to still leverage the macro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant