Skip to content

Latest commit

 

History

History
102 lines (81 loc) · 2.57 KB

component_metadata.md

File metadata and controls

102 lines (81 loc) · 2.57 KB

Component metadata

Here you can find additional information about the different properties that must be contained in the metadata object of the component.

name

The name of the component. It must match the name of the containing folder.

icon

The name of the icon file to use for the component. The icon must be in the icons folder in the root of the repository. Only SVG files are supported. See here for more detail about the icon formats.

inputs

It should contain an array of input objects. Each object must have the following properties:

{
    name: the identifier of the parameter. Must be unique,
    title: the human-readable description of the name,
    description: optional. A longer description of the parameter
}

Parameters must appear in the corresponding SQL function (procedure.sql file) in the same order as in this array.

The types of the parameters in the SQL function should also be equivalent to those declared here in the metadata.

These are the available types to be used. Notice that some of them have additional properties apart from the ones mentioned above:

  • Table

      {
          "title": "Input table"
          "description": "The input table",
          "type": "Table"
      }
  • Boolean

      {
          "title": "Convert to meters"
          "description": "Convert values to meters",
          "type": "Boolean"
      }
  • String

    {
        "title": "SELECT statement"
        "description": "The SELECT statement to run",
        "type": "String"
    }
  • Number (it accepts min, max and default properties)

    {
    "title": "Distance"
    "description": "The buffer distance",
    "type": "number",
    }
    
    
  • Selection

    {
        "title": "Units"
        "description": "Units to use",
        "type": "Selection",
        "options": ["meters", "miles"]
    }
  • Column

      {
          "title": "Geo column"
          "description": "The column containing geometries",
          "type": "Column",
          "parent": "source_table"
      }

outputs

It should contain an array of output elements. Since outputs generated by workflow components can only be tables, an output element is defined just like an input table element. For instance:

{
    "title": "Output table"
    "description": "The output table",
    "type": "Table"
}

procedureName

The name of the procedure stored in the procedure.sql file that will be called to execute the component.