dbt-labs / dbt-labs/redshift

unload_table Macro extended to accept WHERE clause in SELECT statement

Open
#47 1 comment 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
PLpgSQL
Stars
105
Forks
39
PR merge metrics
No merged PRs in 30d

Description

### 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.