Zum Inhalt
HALOWERK

Finopswerk

typed logical byte projection

From original typed scalar/struct/repeated logical cells reconstruct full row/leaf/table footprints and selected-path union bytes. GoogleSQL logical widths, UTF8 string2byte overhead,decodedBYTES2byte overhead,SQLNULL0,noStruct/Array overhead. Absent captured cell is unknown, not SQLNULL; known leaf errors remain negative. Own finite profile, no physical storage/SQL-queryplan/cache/pricing/bill/provider validity claim. A schema-valid unknown is a successful result at the same fixed price..

POST https://finops.halowerk.com/v1/typed-logical-byte-projection

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
fieldsarrayJa
rowsarrayJa
projectionarrayJa
reportobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,7}$",
            "minLength": 1,
            "maxLength": 8
          },
          "kind": {
            "enum": [
              "BOOL",
              "INT64",
              "STRING",
              "BYTES",
              "NUMERIC",
              "BIGNUMERIC",
              "STRUCT",
              "ARRAY_INT64",
              "ARRAY_STRING",
              "ARRAY_STRUCT"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_]{0,7}$",
                  "minLength": 1,
                  "maxLength": 8
                },
                "kind": {
                  "enum": [
                    "BOOL",
                    "INT64",
                    "STRING",
                    "BYTES",
                    "NUMERIC",
                    "BIGNUMERIC"
                  ]
                }
              },
              "required": [
                "name",
                "kind"
              ],
              "additionalProperties": false
            },
            "minItems": 0,
            "maxItems": 2
          }
        },
        "required": [
          "name",
          "kind",
          "fields"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 2
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "maxProperties": 2,
        "propertyNames": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_]{0,7}$",
          "minLength": 1,
          "maxLength": 8
        },
        "additionalProperties": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "maxLength": 40
                }
              ]
            },
            {
              "type": "object",
              "maxProperties": 2,
              "propertyNames": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_]{0,7}$",
                "minLength": 1,
                "maxLength": 8
              },
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "string",
                    "maxLength": 40
                  }
                ]
              }
            },
            {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "string",
                    "maxLength": 40
                  },
                  {
                    "type": "object",
                    "maxProperties": 2,
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9_]{0,7}$",
                      "minLength": 1,
                      "maxLength": 8
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "string",
                          "maxLength": 40
                        }
                      ]
                    }
                  }
                ]
              },
              "minItems": 0,
              "maxItems": 3
            }
          ]
        }
      },
      "minItems": 1,
      "maxItems": 3
    },
    "projection": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9_]{0,7}(\\.[a-z][a-z0-9_]{0,7})?$",
        "minLength": 1,
        "maxLength": 17
      },
      "minItems": 1,
      "maxItems": 4
    },
    "report": {
      "type": "object",
      "properties": {
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "logical_bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "selected_bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3000
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "logical_bytes",
              "selected_bytes"
            ],
            "additionalProperties": false
          },
          "minItems": 1,
          "maxItems": 3
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]{0,7}(\\.[a-z][a-z0-9_]{0,7})?$",
                    "minLength": 1,
                    "maxLength": 17
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "logical_bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3000
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "path",
              "logical_bytes"
            ],
            "additionalProperties": false
          },
          "minItems": 1,
          "maxItems": 4
        },
        "selected_leaves": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_]{0,7}(\\.[a-z][a-z0-9_]{0,7})?$",
                "minLength": 1,
                "maxLength": 17
              },
              {
                "type": "null"
              }
            ]
          },
          "minItems": 1,
          "maxItems": 4
        },
        "table_bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 3000
            },
            {
              "type": "null"
            }
          ]
        },
        "selected_bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 3000
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "rows",
        "columns",
        "selected_leaves",
        "table_bytes",
        "selected_bytes"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "fields",
    "rows",
    "projection",
    "report"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "fields": [
    {
      "name": "meta",
      "kind": "STRUCT",
      "fields": [
        {
          "name": "ok",
          "kind": "BOOL"
        },
        {
          "name": "name",
          "kind": "STRING"
        }
      ]
    },
    {
      "name": "items",
      "kind": "ARRAY_STRUCT",
      "fields": [
        {
          "name": "count",
          "kind": "INT64"
        },
        {
          "name": "data",
          "kind": "BYTES"
        }
      ]
    }
  ],
  "rows": [
    {
      "meta": {
        "ok": true,
        "name": "abc"
      },
      "items": [
        {
          "count": "42",
          "data": "00ff"
        },
        {
          "count": "-1",
          "data": ""
        }
      ]
    },
    {
      "meta": null,
      "items": []
    }
  ],
  "projection": [
    "meta"
  ],
  "report": {
    "rows": [
      {
        "logical_bytes": 28,
        "selected_bytes": 6
      },
      {
        "logical_bytes": 0,
        "selected_bytes": 0
      }
    ],
    "columns": [
      {
        "path": "meta.ok",
        "logical_bytes": 1
      },
      {
        "path": "meta.name",
        "logical_bytes": 5
      },
      {
        "path": "items.count",
        "logical_bytes": 16
      },
      {
        "path": "items.data",
        "logical_bytes": 6
      }
    ],
    "selected_leaves": [
      "meta.ok",
      "meta.name"
    ],
    "table_bytes": 28,
    "selected_bytes": 6
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →