in azkustoingest/ingest.go [144:177]
func (i *Ingestion) fromFile(ctx context.Context, fPath string, options []FileOption, props properties.All) (*Result, error) {
local, err := queued.IsLocalPath(fPath)
if err != nil {
return nil, err
}
var scope SourceScope
if local {
scope = FromFile
props.Source.OriginalSource = fPath
} else {
scope = FromBlob
}
result, props, err := i.prepForIngestion(ctx, options, props, scope)
if err != nil {
return nil, err
}
result.record.IngestionSourcePath = fPath
if local {
err = i.fs.Local(ctx, fPath, props)
} else {
err = i.fs.Blob(ctx, fPath, 0, props)
}
if err != nil {
return nil, err
}
result.putQueued(ctx, i)
return result, nil
}