Created
April 24, 2019 13:11
-
-
Save jesspanni/f15b98453d59d5f5ef7559f11d7c121c to your computer and use it in GitHub Desktop.
LoadCommand
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 LoadCommand | |
{ | |
public string Database { get; set; } | |
public string Schema { get; set; } | |
public string Warehouse { get; set; } | |
public string Stage { get; set; } | |
public string TargetTable { get; set; } | |
public string[] Files { get; set; } | |
public bool Force { get; set; } | |
public bool Validate(out string message) | |
{ | |
if (string.IsNullOrWhiteSpace(this.TargetTable)) | |
{ | |
message = $"{nameof(this.TargetTable)} 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