Skip to content

Instantly share code, notes, and snippets.

@jesspanni
Created April 24, 2019 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesspanni/f15b98453d59d5f5ef7559f11d7c121c to your computer and use it in GitHub Desktop.
Save jesspanni/f15b98453d59d5f5ef7559f11d7c121c to your computer and use it in GitHub Desktop.
LoadCommand
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