
{%- from "field_properties.jinja2" import field_properties -%}
import seedcase_sprout as sp

{{ resource_name | to_variable_name }} = sp.ResourceProperties(
    ## Required:
    name="{{ resource_name }}",
    title="",
    description="",
    ## Optional:
    type="table",
    format="parquet",
    mediatype="application/parquet",
    schema=sp.TableSchemaProperties(
        ## Required
        fields=[
        {%- if fields %}
            {%- for field in fields -%}
            {{ field_properties(field.name, field.type) | indent(12) }}
            {%- endfor -%}
        {% else -%}
            {{ field_properties() | indent(12) }}
        {%- endif %}
        ],
        ## Optional
        # fields_match=["equal"],
        # primary_key=[""],
        # unique_keys=[[""]],
        # foreign_keys=[
        #     sp.TableSchemaForeignKeyProperties(
        #         ## Required
        #         fields=[""],
        #         reference=sp.ReferenceProperties(
        #             ## Required
        #             resource="",
        #             fields=[""],
        #         ),
        #     ),
        # ],
    ),
    # sources=[
    #     sp.SourceProperties(
    #         ## Required:
    #         title="",
    #         ## Optional:
    #         path="",
    #         email="",
    #         version="",
    #     ),
    # ],
)
