For AI agents: the complete documentation index is available at https://docs.dataplatform.ovh.net/ja/llms.txt, the full documentation bundle is available at https://docs.dataplatform.ovh.net/ja/llms-full.txt, and this page is available as Markdown at https://docs.dataplatform.ovh.net/ja/legacy/api-reference-qb.md.
  • 🇯🇵 日本語
  • API リファレンス: クエリ ビルダー / Analytics Manager

    Warning

    このページでは、ForePaaS レガシー プラットフォームについて説明しています。このプラットフォームは新規登録を受け付けていません。OVHcloud Data Platformをご利用の場合は、Analytics Managerを参照してください。

    このページでは、Query BuilderのAPIリファレンスについて説明しています。Query Builderは、Analytics Managerに置き換えられました。

    ?> すべてのForePaaSエンドポイントと同様に、これらのエンドポイントを利用するには、アクセスしようとしているプロジェクトのIAMから認証トークンが必要です。認証トークンを取得するには、このサブセクションに従ってください。 また、サービスQuery Builder Legacy(IAM)で対応する権限を持っていることを確認してください。


    クエリ エンドポイント

    説明

    エンドポイント

    • POST /qb/query

    クエリ パラメータ

    パラメータ名必須説明
    data.fieldsはい{ "income":["sum"],"expense":["sum"]}返すフィールドとその計算モード(select、select_distinct、sum、min、max、avg、count、count_distinctのいずれか)
    data.skipいいえ10スキップする行数
    data.limitいいえ100返す行数
    data.hintsいいえtrue/falseクエリ(data.limitを除く)に対応する総行数
    filterいいえ{ "date": { "between": ["1420066800", "1428962399"] }, "client_code": { "in": ["08KD", "09CC"] }, "creation_date": { "eq": ["2018-01-01"] }}データに対してフィルターを適用します。フィルターは、in、not_in、between、not_between、eq、not_equal、like、not_like、is_null、is_not_null、gt (>)、gte (>=)、lt (<)、lte (<=)のいずれかです。
    scale.fieldsいいえ["date",["client_code", "employee_id"]]クエリにスケール(グループ化)を適用します。計算されたスケールまたは複数のスケールを指定できます。
    evol.scaleいいえ"year"進化に適用するスケール(weekday;week; month; quarter; semester; year)
    evol.modeいいえ"date""weekday"date:同じ日付との比較weekday:同じ曜日を考慮した比較。
    evol.depthいいえ5取得したい進化の数
    total.allいいえ[]["client_code"]異なるスケールごとの総クエリ(オプション)
    total.xいいえ["client_code"]特定の属性の総クエリ
    orderいいえ{ "date":"asc"}クエリ出力の順序(ascまたはdesc、デフォルトはasc)
    table_nameいいえ"prim_vehicles"特定のテーブルでクエリを実行するように強制します
    database_nameいいえ"data_prim""data_mart"特定のレイヤーでクエリを実行するように強制します

    サンプルクエリ、リクエストボディ

    {
      "data": {
        "fields": {
          "a": ["sum"],
          "b": ["sum", "avg"]
        },
        "skip": 10,
        "limit": 10
      },
      "filter": {
        "h": {
          "between": ["1420066800,1428962399"]
        },
        "c": {
          "in": [1, 2, 3]
        },
        "g": {
          "eq": [1]
        },
        "x": {
          "is_null": []
        }
      },
      "scale": {
        "fields": ["d", ["e", "f"]]
      },
      "evol": {
        "scale": "year",
        "mode": "date",
        "depth": 5
      },
      "total": {
        "all": [],
        "x": ["d"]
      },
      "order": { //order module to order query output (asc or desc, asc by default)
        "c": "asc"
      },
      "table_name": "TABLE_NAME" //force table_name for the query
    }

    サンプルクエリ、レスポンス

    コード説明
    200JSONオブジェクト
    {
        "success": true,
        "timestamp": 1435936140,
        "duration": 0.09,
        "error": null,
        "warning": null,
        "query_params": {…}, //recap of the executed query
        "results": [  //results of the query      
            {
                "data": {
                    "a": {
                        "sum": [
                            {
                                "month": 1,
                                "team": "Team Rocket",
                                "value": 10300
                            },
                            {
                                "month ": null,
                                "team": null,
                                "value": null
                            }
                        ]
                    }1
                },
                "scales": {
                    "month_date_fact": 1,
                    "team": "Team Rocket"
                }
            }
        ],
        "total": { //results for each total provided by the query
            "all": [{…}]        
        }
    }

    データセット エンドポイント

    Warning

    この機能は、レガシーのQuery Builderから提供されており、近いうちに廃止される予定です。代わりに、Analytics ManagerLakehouse Managerをご確認ください。

    説明

    • Query Builderからデータセットを返します。

    エンドポイント

    • GET /qb/dataset

    レスポンス

    コード説明
    200JSONオブジェクト
    
    {
        "success": true,
        "timestamp": 1435934914,
        "duration": 0.002,
        "data": { //list of available data and the compute mode
            "a": {
                "computes": ["sum"],
                "default": "sum"        
            }
        },
        "compute_mods": [ //list of available compute mode
    
        ],
        "orders": [ //list of available fields for sorting queries
    
        ],
        "filters": [ //list of available fields for filtering queries
    
        ],
        "scales": [ //list of available fields for grouping queries
    
        ],
        "evol": [ //list of available evolution mode
    
        ],
        "dictionnary": { //The data dictionary for reporting
    
        }
    }