Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v4.5
Search
    Français
    v4.5

      Téléchargements et Exportations

      Cette section introduit les méthodes sur un objet Connection pour télécharger des fichiers de résultats d'algorithme et exporter des nodes et edges à partir d'un graphset.

      Chaque exemple se concentre uniquement sur l'utilisation de la méthode. Pour un exemple de code complet, veuillez vous référer à l'exemple complet.

      DownloadAlgoResultFile()

      Télécharge un fichier de résultat d'une tâche d'algorithme dans le graph actuel.

      Paramètres :

      • int : ID de la tâche de l'algorithme qui a généré le fichier.
      • string : Nom du fichier.
      • AlgoAPI.OnData : Fonction qui reçoit le résultat de la requête.
      • RequestConfig (Optionnel) : Paramètres de configuration pour la requête.

      Renvoie :

      • Response : Résultat de la requête.

      RequestConfig requestConfig = new RequestConfig()
      {
          UseMaster = true,
          Graph = "miniCircle",
      };
      
      // Exécute l'algorithme Louvain dans le graphset 'miniCircle' et affiche l'ID de la tâche
      
      var res = await ultipa.Uql(
          "algo(louvain).params({phase1_loop_num: 20, min_modularity_increase: 0.001}).write({file:{filename_community_id: 'communityID', filename_ids: 'ids', filename_num: 'num'}})",
          requestConfig
      );
      
      var task = res.Alias("_task").AsTable();
      var taskId = int.Parse((string)task.Rows[0][0]);
      var filename = "communityID";
      
      Thread.Sleep(2000);
      var stream = new MemoryStream();
      
      Console.WriteLine("TaskId :" + taskId);
      Console.WriteLine("Content of the file '" + filename + "'");
      await ultipa.DownloadAlgoResultFile(
          taskId,
          filename,
          (reply, filename) =>
          {
              stream.Write(reply.Chunk.ToByteArray());
          }
      );
      
      var bs = stream.ToArray();
      Console.Write(Encoding.UTF8.GetString(bs));
      

      TaskId :77218
      Content of the file 'communityID'
      

      DownloadAllAlgoResultFile()

      Télécharge tous les fichiers de résultats d'une tâche d'algorithme dans le graph actuel.

      Paramètres :

      • int : ID de la tâche de l'algorithme qui a généré le(s) fichier(s).
      • AlgoAPI.OnData : Fonction qui reçoit le résultat de la requête.
      • RequestConfig (Optionnel) : Paramètres de configuration pour la requête.

      Renvoie :

      • Response : Résultat de la requête.

      // Exécute l'algorithme Louvain dans le graphset 'miniCircle' et affiche l'ID de la tâche
      
      RequestConfig requestConfig = new RequestConfig() { UseMaster = true, Graph = "miniCircle" };
      
      {
          var res = await ultipa.Uql(
              "algo(louvain).params({phase1_loop_num: 20, min_modularity_increase: 0.001}).write({file:{filename_community_id: 'communityID', filename_ids: 'ids', filename_num: 'num'}})",
              requestConfig
          );
      
          var task = res.Alias("_task").AsTable();
          var taskId = int.Parse((string)task.Rows[0][0]);
          Thread.Sleep(2000);
      
          Console.WriteLine("TaskId :" + taskId);
          var streams = new Dictionary<string, MemoryStream>();
          await ultipa.DownloadAlgoAllResultFile(
              taskId,
              (reply, filename) =>
              {
                  if (!streams.ContainsKey(filename))
                  {
                      streams[filename] = new MemoryStream();
                  }
      
                  streams[filename].Write(reply.Chunk.ToByteArray());
              }
          );
      
          foreach (var kv in streams)
          {
              var bs = kv.Value.ToArray();
              Console.WriteLine("Content of the file'" + kv.Key + "'");
              Console.WriteLine("Download complete");
          }
      }
      

      TaskId :79667
      Content of the file 'communityID'
      Download complete
      Content of the file 'ids'
      Download complete
      Content of the file 'num'
      Download complete
      

      Export()

      Exporte des nodes et edges du graph actuel.

      Paramètres :

      • ExportRequest : Configurations pour la demande d'exportation, incluant DbType:ULTIPA.DBType, Schema:string, Limit:number et selectProperties:List<string>.
      • ExportAPI.OnData : Fonction qui reçoit le résultat de la requête.
      • RequestConfig (Optionnel) : Paramètres de configuration pour la requête.

      Renvoie :

      • ExportReply : Résultat de la requête.

      // Exporte 10 nodes de schema 'account' avec des propriétés sélectionnées dans le graphset 'miniCircle' et affiche le résultat
      RequestConfig requestConfig = new RequestConfig()
      {
          UseMaster = true,
          Graph = "miniCircle",
      };
      
      ExportRequest exportConfig = new ExportRequest()
      {
          Schema = "account",
          Limit = 10,
          DbType = DBType.Dbnode,
          SelectProperties = { "name", "year" },
      };
      
      await ultipa.Export(
          exportConfig,
          (nodes, edges) =>
          {
              foreach (var node in nodes)
              {
                  Console.WriteLine(JsonConvert.SerializeObject(node));
              }
          },
          requestConfig
      );
      

      {"Uuid":1,"Id":"ULTIPA8000000000000001","Schema":"account","Values":{"name":"Yu78","year":1978}}
      {"Uuid":2,"Id":"ULTIPA8000000000000002","Schema":"account","Values":{"name":"jibber-jabber","year":1989}}
      {"Uuid":3,"Id":"ULTIPA8000000000000003","Schema":"account","Values":{"name":"mochaeach","year":1982}}
      {"Uuid":4,"Id":"ULTIPA8000000000000004","Schema":"account","Values":{"name":"Win-win0","year":2007}}
      {"Uuid":5,"Id":"ULTIPA8000000000000005","Schema":"account","Values":{"name":"kevinh","year":1973}}
      {"Uuid":6,"Id":"ULTIPA8000000000000006","Schema":"account","Values":{"name":"alexyhel","year":1974}}
      {"Uuid":7,"Id":"ULTIPA8000000000000007","Schema":"account","Values":{"name":"hooj","year":1986}}
      {"Uuid":8,"Id":"ULTIPA8000000000000008","Schema":"account","Values":{"name":"vv67","year":1990}}
      {"Uuid":9,"Id":"ULTIPA8000000000000009","Schema":"account","Values":{"name":"95smith","year":1988}}
      {"Uuid":10,"Id":"ULTIPA800000000000000A","Schema":"account","Values":{"name":"jo","year":1992}}
      

      Exemple Complet

      using System.Data;
      using System.Security.Cryptography.X509Certificates;
      using System.Xml.Linq;
      using Google.Protobuf.WellKnownTypes;
      using Microsoft.Extensions.Logging;
      using Newtonsoft.Json;
      using UltipaService;
      using UltipaSharp;
      using UltipaSharp.api;
      using UltipaSharp.configuration;
      using UltipaSharp.connection;
      using UltipaSharp.exceptions;
      using UltipaSharp.structs;
      using UltipaSharp.utils;
      using Logger = UltipaSharp.utils.Logger;
      using Property = UltipaSharp.structs.Property;
      using Schema = UltipaSharp.structs.Schema;
      
      class Program
      {
          static async Task Main(string[] args)
          {
              // Configurations de connexion
              // Exemple d'URI : Hosts=new[]{"mqj4zouys.us-east-1.cloud.ultipa.com:60010"}
              var myconfig = new UltipaConfig()
              {
                  Hosts = new[] { "192.168.1.85:60061", "192.168.1.86:60061", "192.168.1.87:60061" },
                  Username = "***",
                  Password = "***",
              };
      
              // Établit la connexion à la base de données
              var ultipa = new Ultipa(myconfig);
              var isSuccess = ultipa.Test();
              Console.WriteLine(isSuccess);
      
              // Configurations de requête
              RequestConfig requestConfig = new RequestConfig()
              {
                  UseMaster = true,
                  Graph = "miniCircle",
              };
      
              // Exporte 10 nodes de schema 'account' avec des propriétés sélectionnées dans le graphset 'miniCircle' et affiche le résultat
              ExportRequest exportConfig = new ExportRequest();
              exportConfig.Schema = "account";
              exportConfig.Limit = 10;
              exportConfig.DbType = DBType.Dbnode;
              exportConfig.SelectProperties = ["_id", "_uuid", "name", "year"];
              await ultipa.Export(
                  exportConfig,
                  (nodes, edges) =>
                  {
                      foreach (var node in nodes)
                      {
                          Console.WriteLine(JsonConvert.SerializeObject(node));
                      }
                  },
                  requestConfig
              );
          }
      }
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写