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

Support flexible data exporting demand in copy to #4776

Closed
MichaelScofield opened this issue Sep 27, 2024 · 2 comments
Closed

Support flexible data exporting demand in copy to #4776

MichaelScofield opened this issue Sep 27, 2024 · 2 comments
Labels
C-feature Category Features

Comments

@MichaelScofield
Copy link
Collaborator

What problem does the new feature solve?

copy to can only export data within a time range, which is not sufficient for various data exporting demand sometimes.

What does the feature do?

To meet the various data exporting demand, I think it's best for user to write queries in the copy to statement. Like this:

COPY tbl TO '/xxx/xxx/output.parquet' WITH (FORMAT = 'parquet', Q = 'select a, b from tbl where c = 1');

Only the data populated by the "Q" is exported. In this way, user could express his data exporting demand in the query, which is very flexible.

Implementation challenges

No response

@MichaelScofield MichaelScofield added the C-feature Category Features label Sep 27, 2024
@Kev1n8
Copy link
Contributor

Kev1n8 commented Oct 18, 2024

I'm interested in this. And I have a wonder regarding the implementation, looking forward to any suggestions:

Assume making time range option compatible with Q option. How should it behave when the cmd is: COPY tbl TO 'xxx.parquet' WITH (FORMAT = 'parquet', START_TIME = some_st, END_TIME = some_et, Q = 'SELECT * from tbl where ts <some_st')? One way I'm thinking is to perform AND on both time range filters inside and outside of the Q.

@MichaelScofield
Copy link
Collaborator Author

@Kev1n8 Thank you for being interested. I'm thinking we can use the "csv" of the alternative format in the http api instead. So I'm gonna close this issue. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category Features
Projects
None yet
Development

No branches or pull requests

2 participants