Skip to content

Instantly share code, notes, and snippets.

@jesspanni
Created April 24, 2019 13:10
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/1b7c1bafa682972a35c76a33bd125484 to your computer and use it in GitHub Desktop.
Save jesspanni/1b7c1bafa682972a35c76a33bd125484 to your computer and use it in GitHub Desktop.
UnloadCommand
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