Created
April 24, 2019 13:10
-
-
Save jesspanni/1b7c1bafa682972a35c76a33bd125484 to your computer and use it in GitHub Desktop.
UnloadCommand
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
public class UnloadCommand | |
{ | |
public string Database { get; set; } | |
public string Schema { get; set; } | |
public string Warehouse { get; set; } | |
public string Stage { get; set; } | |
public string Query { get; set; } | |
public string FilePrefix { get; set; } | |
public bool SingleFile { get; set; } | |
public bool Overwrite { get; set; } | |
public bool Validate(out string message) | |
{ | |
if (string.IsNullOrWhiteSpace(this.Query)) | |
{ | |
message = $"{nameof(this.Query)} is a required property"; | |
return false; | |
} | |
if (string.IsNullOrWhiteSpace(this.Stage)) | |
{ | |
message = $"{nameof(this.Stage)} is a required property"; | |
return false; | |
} | |
message = null; | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment