Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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