def METHOD_NAME(sqlite_url):
    # write table
    resource = TableResource.from_descriptor(
        {
            "name": "commune",
            "schema": {
                "fields": [{"name": "insee_com", "type": "string"}],
                "primaryKey": ["insee_com"],
            },
            "data": [["insee_com"], ["01001"], ["01002"]],
        }
    )
    source = Package(resources=[resource])
    source.publish(sqlite_url)
    # write table using pipeline step
    package = Package("data/package-with-pipeline-multiple-tables-to-write.json")
    package.resources[0].path = sqlite_url
    package.resources[1].pipeline.steps[0].path = sqlite_url  # type: ignore
    package.resources[2].pipeline.steps[0].path = sqlite_url  # type: ignore
    for resource in package.resources:
        if resource.pipeline:  # type: ignore
            resource.transform()  # type: ignore
    # read tables
    target = Package(sqlite_url)
    assert target.get_resource("zrr").schema.to_descriptor() == {
        "fields": [
            {"name": "CODGEO", "type": "string"},
            {"name": "LIBGEO", "type": "string"},
            {"name": "ZRR_SIMP", "type": "string"},
            {"name": "ZONAGE_ZRR", "type": "string"},
        ],
        "foreignKeys": [
            {
                "fields": ["CODGEO"],
                "reference": {"resource": "commune", "fields": ["insee_com"]},
            }
        ],
    }