in src/Program.cs [421:468]
private static void PrintUsage(bool advanced = false)
{
var esb = new ExtendedStringBuilder();
if (advanced)
{
CommandLineArgsParser.WriteHelpString(esb, new ExtendedCommandLineArgs());
}
else
{
CommandLineArgsParser.WriteHelpString(esb, new CommandLineArgs());
}
esb.AppendLine();
esb.AppendLine("Usage examples:");
esb.AppendLine();
esb.Indent();
esb.AppendLine(@"[Ingest JSON data from blobs]");
esb.AppendLine(@"LightIngest ""https://ingest-contoso.kusto.windows.net;Federated=true""");
esb.Indent();
esb.AppendLine(@"-database:MyDb");
esb.AppendLine(@"-table:MyTable");
esb.AppendLine(@"-sourcePath:""https://ACCOUNT_NAME.blob.core.windows.net/CONTAINER_NAME?SAS_TOKEN""");
esb.AppendLine(@"-prefix:MyDir1/MySubDir2");
esb.AppendLine(@"-format:json");
esb.AppendLine(@"-mappingRef:DefaultJsonMapping");
esb.AppendLine(@"-pattern:*.json");
esb.AppendLine(@"-limit:100");
esb.Unindent();
esb.AppendLine();
esb.AppendLine(@"[Ingest CSV data with headers from local files]");
esb.AppendLine(@"LightIngest ""https://ingest-contoso.kusto.windows.net;Federated=true""");
esb.Indent();
esb.AppendLine(@"-database:MyDb");
esb.AppendLine(@"-table:MyTable");
esb.AppendLine(@"-sourcePath:""D:\MyFolder\Data""");
esb.AppendLine(@"-format:csv");
esb.AppendLine(@"-ignoreFirstRow:true");
esb.AppendLine(@"-mappingPath:""D:\MyFolder\CsvMapping.txt""");
esb.AppendLine(@"-pattern:*.csv.gz");
esb.AppendLine(@"-limit:100");
esb.Unindent();
esb.AppendLine();
esb.AppendLine(@"Use LighIngest /?? for advanced options");
esb.Unindent();
esb.AppendLine();
Console.WriteLine(esb.ToString());
Environment.Exit(1);
}