Skip to content

editor_toolset.toolsets.data_table.DataTableTools

Provides tools for creating and editing DataTable assets.

10 tool(s).

editor_toolset.toolsets.data_table.DataTableTools.add_rows

Adds new rows with default values to the data table.

    Args:
        data_table: The DataTable to modify.
        row_names: The names for the new rows.

Input schema

{
  "properties": {
    "data_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.DataTable",
      "type": "object"
    },
    "row_names": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "data_table",
    "row_names"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.create

Creates a new DataTable asset with the specified column schema.

    Args:
        folder_path: The path to the folder that will contain the asset.
        asset_name: The name of the asset.
        schema: The struct that defines the columns of the table.
                Must be a subclass of TableRowBase.

    Returns:
        The created DataTable.

Input schema

{
  "properties": {
    "asset_name": {
      "type": "string"
    },
    "folder_path": {
      "type": "string"
    },
    "schema": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/CoreUObject.ScriptStruct",
      "type": "object"
    }
  },
  "required": [
    "folder_path",
    "asset_name",
    "schema"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.DataTable",
      "type": "object"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.get_rows

Returns the column values for one or more rows as a JSON string.

    Args:
        data_table: The DataTable to query.
        row_names: The names of the rows to retrieve.

    Returns:
        A JSON object mapping each row name to an object of property names and values.

Input schema

{
  "properties": {
    "data_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.DataTable",
      "type": "object"
    },
    "row_names": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "data_table",
    "row_names"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "type": "string"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.get_schema

Returns the column schema of the data table as a JSON string.

    Args:
        data_table: The DataTable to query.

    Returns:
        A JSON formatted string mapping column names to their type info.

Input schema

{
  "properties": {
    "data_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.DataTable",
      "type": "object"
    }
  },
  "required": [
    "data_table"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "type": "string"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.import_file

Imports a file from disk as a DataTable asset.

    The file's columns must match the property names in schema. Use
    search_row_structs to discover usable schema structs.

    Args:
        folder_path: The content-browser folder to create the asset in.
        asset_name: The name of the new asset.
        source_file: The absolute path to the source file on disk.
        schema: The struct that defines the columns of the table. Must be a
            subclass of TableRowBase.

    Returns:
        The assets produced by the import (typically a single DataTable).

Input schema

{
  "properties": {
    "asset_name": {
      "type": "string"
    },
    "folder_path": {
      "type": "string"
    },
    "schema": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/CoreUObject.ScriptStruct",
      "type": "object"
    },
    "source_file": {
      "type": "string"
    }
  },
  "required": [
    "folder_path",
    "asset_name",
    "source_file",
    "schema"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "properties": {
          "refPath": {
            "description": "The reference stored as a soft path string.",
            "type": "string"
          }
        },
        "required": [
          "refPath"
        ],
        "title": "/Script/CoreUObject.Object",
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.list_rows

Lists the names of all rows in the data table.

    Args:
        data_table: The DataTable to query.

    Returns:
        A list of row names.

Input schema

{
  "properties": {
    "data_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.DataTable",
      "type": "object"
    }
  },
  "required": [
    "data_table"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.remove_rows

Removes rows from the data table.

    Args:
        data_table: The DataTable to modify.
        row_names: The names of the rows to remove.

Input schema

{
  "properties": {
    "data_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.DataTable",
      "type": "object"
    },
    "row_names": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "data_table",
    "row_names"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.rename_rows

Renames one or more rows in the data table.

    Args:
        data_table: The DataTable to modify.
        renames: A mapping of existing row names to their new names.

Input schema

{
  "properties": {
    "data_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.DataTable",
      "type": "object"
    },
    "renames": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object"
    }
  },
  "required": [
    "data_table",
    "renames"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.search_row_structs

Finds structs that can be used as a DataTable schema.

    Args:
        struct_name: If set, will filter structs by name using wildcard match.

    Returns:
        A list of structs derived from TableRowBase that match the criteria.

Input schema

{
  "properties": {
    "struct_name": {
      "default": "*",
      "type": "string"
    }
  },
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "properties": {
          "refPath": {
            "description": "The reference stored as a soft path string.",
            "type": "string"
          }
        },
        "required": [
          "refPath"
        ],
        "title": "/Script/CoreUObject.ScriptStruct",
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.data_table.DataTableTools.set_rows

Sets column values for one or more rows.

    Args:
        data_table: The DataTable to modify.
        values: A JSON object mapping row names to objects of camelCase property
                names and values to update. Only specified properties are updated;
                others remain unchanged.

Input schema

{
  "properties": {
    "data_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.DataTable",
      "type": "object"
    },
    "values": {
      "type": "string"
    }
  },
  "required": [
    "data_table",
    "values"
  ],
  "type": "object"
}