Created
June 4, 2019 08:28
-
-
Save adammarples/439f1ce55768ff5bf1870a0cb4572a13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace file format example_file_format_name | |
type = 'csv' | |
field_delimiter = ',' | |
skip_header = 1 | |
date_format = 'DD/MM/YYYY'; | |
create or replace stage example_stage_name | |
file_format = example_file_format_name; | |
////example.csv | |
//auto,euro | |
//03/12/2019,12/03/2019 | |
//05/27/2019,27/05/2019 | |
push example.csv @example_stage_name | |
select $1 auto, $2 euro from @example_stage_name/example.csv.gz | |
select $1::date auto, $2 euro from @example_stage_name/example.csv.gz | |
select $1 auto, $2::date euro from @example_stage_name/example.csv.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment