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 create/describe stage #2900

Closed
Tracked by #2976
sundy-li opened this issue Nov 19, 2021 · 5 comments · Fixed by #3253
Closed
Tracked by #2976

Support create/describe stage #2900

sundy-li opened this issue Nov 19, 2021 · 5 comments · Fixed by #3253
Assignees
Labels
A-meta Area: databend meta serive community-take good first issue Category: good first issue

Comments

@sundy-li
Copy link
Member

sundy-li commented Nov 19, 2021

Summary

Description for this feature.

Support create/describe stage.

Stage is a special table with some specific storage config.

We can upload files into the stage or unload the data from tables into files in the stage.

Refer to snowflake's stage doc: https://docs.snowflake.com/en/sql-reference/sql/create-stage.html

Firstly we implement the first stage command like:


CREATE [ OR REPLACE ]  STAGE [ IF NOT EXISTS ] <stage_name>
  stage_params
  [ FILE_FORMAT = ( FORMAT =  {CSV | JSON | PARQUET} [ formatOptions ] ) } ]
  [ COMMENT = '<string_literal>' ]
  
  stage_params ::= 
  -- for S3 currently
	URL = 's3://<bucket>[/<path>/]'
	ACCESS_KEY_ID='<string_literal>'
	AECRET_ACCESS_KEY='<string_literal>'
	
  formatOptions ::= 
  -- If TYPE = CSV
  	COMPRESSION = AUTO | GZIP | BZ2 | BROTLI | ZSTD | DEFLATE | RAW_DEFLATE | NONE
     	RECORD_DELIMITER = '<character>' | NONE
  -- If TYPE = Parquet
	COMPRESSION = AUTO | LZO | SNAPPY | NONE

@sundy-li sundy-li added A-meta Area: databend meta serive good first issue Category: good first issue labels Nov 19, 2021
@GrapeBaBa
Copy link
Contributor

/assignme

@sundy-li
Copy link
Member Author

sundy-li commented Dec 2, 2021

@GrapeBaBa
Hi, did you still work on this? I would like to continue it myself before releasing v0.6.

@GrapeBaBa
Copy link
Contributor

@sundy-li I think I can finish it by the end of this week. If it is not ok, you can take it.

@sundy-li
Copy link
Member Author

sundy-li commented Dec 2, 2021

Ok, I'll wait for it, feel free to submit a draft pr then I'll try to collaborate with you.

@GrapeBaBa
Copy link
Contributor

Ok, I'll wait for it, feel free to submit a draft pr then I'll try to collaborate with you.

@sundy-li need one more day to add tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: databend meta serive community-take good first issue Category: good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants