Last active
May 15, 2022 07:46
-
-
Save nordineb/623102855e06d7af55b817da0b5f68af to your computer and use it in GitHub Desktop.
simple select demo
This file contains hidden or 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
DECLARE @inputfile string = "/Data/Meny/postgres_public_customer.csv"; | |
DECLARE @cvsout string = "/Data/Meny/Output/ourcustomers.csv"; | |
DECLARE @tsvout string = "/Data/Meny/Output/ourcustomers.tsv"; | |
DECLARE @txtout string = "/Data/Meny/Output/ourcustomers.txt"; | |
@customers = | |
EXTRACT UserId int, | |
FirstName string, | |
LastName string, | |
Address string, | |
Phone string | |
FROM @inputfile | |
USING Extractors.Csv(); | |
OUTPUT @customers | |
TO @cvsout | |
USING Outputters.Csv(); | |
OUTPUT @customers | |
TO @tsvout | |
USING Outputters.Tsv(); | |
// try to output to @tvsout to demonstrate an error | |
OUTPUT @customers | |
TO @txtout | |
USING Outputters.Text(delimiter: '|',quoting: false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment