-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
When working with incomplete databases in source control, it would be nice to extract only specific tables that you want to add at any given moment.
Adding an additional parameter to the extraction method -sql_objects dbo.table1,dbo.view5,dbo.view8
` var sqlObjects = new List<Tuple<string, string>>();
if (!string.IsNullOrEmpty(_args.Sql_Objects)){
sqlObjects = new List<Tuple<string, string>>();
var argSqlOjects = _args.Sql_Objects.Split(',').ToList();
argSqlOjects.ForEach(x =>
{
var schemaSplit = x.Split('.');
if (schemaSplit.Length != 2)
throw new Exception($"Invalid Sql Object specified: {x}");
sqlObjects.Add(new Tuple<string, string>(schemaSplit[0], schemaSplit[1]));
});
}
`
And then later on
services.Extract(_workDirectory, _args.DatabaseName, "bazel", Version.Parse("0.0.1"), tables: sqlObjects.Count() == 0 ? null : sqlObjects, extractOptions: options);
Metadata
Metadata
Assignees
Labels
No labels