A data source or source is the raw data that you want to use to create a predictive model, detect their anomalies, etc. The complete and updated reference with all available parameters is in our documentation website.
Наследование: Response
 /// <summary>
 /// Create a dataset.
 /// </summary>
 /// <param name="source">The source from which you want to generate a dataset.</param>
 /// <param name="name">The optional name you want to give to the new dataset. </param>
 public Task<DataSet> Create(Source source, string name = null, DataSet.Arguments arguments = null)
 {
     arguments = arguments ?? new DataSet.Arguments();
     if (!string.IsNullOrWhiteSpace(name)) arguments.Name = name;
     arguments.Source = source.Resource;
     return Create<DataSet>(arguments);
 }
Пример #2
0
        /// <summary>
        /// Update a source.
        /// </summary>
        /// <param name="resourceId">A valid source/id</param>
        /// <param name="name">The new name of the source</param>
        /// <param name="parser">New parse options for the source</param>
        public Task<Source> Update(string resourceId, string name = null, Source.Parser parser = null)
        {
            dynamic json = new JsonObject();

            if(!string.IsNullOrWhiteSpace(name)) json.name = name;
            if(parser != null) json.source_parser = parser.ToJson();

            return Update(resourceId, json);
        }
Пример #3
0
        /// <summary>
        /// Create new Source from local file
        /// </summary>
        /// <param name="path">path to local file</param>
        /// <param name="fileName">name to use</param>
        /// <param name="arguments">Additional parameters</param>
        public Task<Source> Create(string path, string fileName = null, Source.Arguments arguments = null)
        {
            fileName = fileName ?? Path.GetFileName(path);

            var boundary = string.Format("--{0}", Guid.NewGuid());

            var request = new MultipartFormDataContent(boundary);
            var customContentType = new MediaTypeHeaderValue("multipart/form-data");
            customContentType.Parameters.Add(new NameValueHeaderValue("boundary", boundary));
            request.Headers.ContentType = customContentType;

            request.Add(File.OpenRead(path), fileName);
            if (arguments != null) request.Add(arguments.ToJson() as JsonObject);

            return Create<Source>(request);
        }
Пример #4
0
 /// <summary>
 /// Update a source.
 /// </summary>
 /// <param name="source">A valid source</param>
 /// <param name="name">The new name of the source</param>
 /// <param name="parser">New parse options for the source</param>
 public Task<Source> Update(Source source, string name = null, Source.Parser parser = null)
 {
     return Update(source.Resource, name, parser);
 }
Пример #5
0
 /// <summary>
 /// Create a new Source
 /// </summary>
 /// <param name="arguments"></param>
 /// <returns></returns>
 public Task<Source> Create(Source.Arguments arguments)
 {
     return arguments.File != null
         ? Create(arguments.File, arguments.Name, arguments)
         : Create<Source>(arguments);
 }
Пример #6
0
 public Task<Source> Create(Source.Arguments arguments)
 {
     return CreateSource(arguments);
 }
Пример #7
0
 public Task<Source> Create(string path, string fileName = null, Source.Arguments arguments = null)
 {
     return CreateSource(path, fileName, arguments);
 }
 public Task <DataSet> Create(Source source, string name = null, DataSet.Arguments arguments = null)
 {
     return(CreateDataset(source, name, arguments));
 }
Пример #9
0
 public Task<DataSet> Create(Source source, string name = null, DataSet.Arguments arguments = null)
 {
     return CreateDataset(source, name, arguments);
 }