# Variables vs meta vs payload

**URL:** <https://discuss.hashicorp.com/t/variables-vs-meta-vs-payload/50230>\
**Category:** Nomad\
**Created:** [February 15, 2023, 7:19pm UTC](https://discuss.hashicorp.com/t/variables-vs-meta-vs-payload/50230 "2023-02-15T19:19:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![masuberu](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/masuberu/32/23944_2.png) [@masuberu](https://discuss.hashicorp.com/u/masuberu)\
**Post date:** [February 15, 2023, 7:19pm UTC](https://discuss.hashicorp.com/t/variables-vs-meta-vs-payload/50230/1 "2023-02-15T19:19:43Z")

</div>

Dear nomad community,

I am learning nomad and trying to create a sysbatch job with input parameters like:

```auto
job "install-slurm" {
  datacenters = ["dc1"]
  type = "sysbatch" # sysbatch --> runs on all nomad clients
  parameterized {
    meta_required = ["version"]
  }
  group "install-slurm" {
    task "zypper" {
      driver = "raw_exec"
      user = "root"
      config {
        command = "zypper"
        args = ["install", "-y", "slurm=${NOMAD_META_version}", "slurm-slurmctld=${NOMAD_META_version}", "slurm-perlapi=${NOMAD_META_version}", "slurm-slurmpmi=${NOMAD_META_version}", "slurm-devel=${NOMAD_META_version}"]
      }
    }
  }
}

```

I am reading the documentation and got something working with meta, however I also saw other options to parametrize jobs like variables and payload.

I would like to ask whats the difference and which use case fits each one of them (meta, variables, payload)

thank you

---

<div class="post-metadata">

**Author:** ![seth.hoenig](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/seth.hoenig/32/27213_2.png) [@seth.hoenig](https://discuss.hashicorp.com/u/seth.hoenig)\
**Post date:** [February 16, 2023, 2:04pm UTC](https://discuss.hashicorp.com/t/variables-vs-meta-vs-payload/50230/2 "2023-02-16T14:04:51Z")

</div>

Hi @masuberu thanks for trying out Nomad!

`meta` - are just key/values that you can specify when running a periodic job that will be merged with the other cascading meta blocks you can define at the job, group, or task level.

> **[meta Block - Job Specification | Nomad | HashiCorp Developer](https://developer.hashicorp.com/nomad/docs/job-specification/meta)**
>
> The "meta" block allows for user-defined arbitrary key-value pairs.

`variables` - are data stored in Nomad’s persistent storage. A job make use of values stored as Nomad variables, similar to how it can make use of meta values. A key difference between variables and meta is that meta is part of your job definition, whereas variables are stored in Nomad.

> **[Variables | Nomad | HashiCorp Developer](https://developer.hashicorp.com/nomad/docs/concepts/variables)**
>
> Learn about the Nomad Variables feature

`payload` - is just a feature of dispatch jobs enabling you to provide a blob of data (whether via stdin or from a file) when running the job. The data could be anything; its structure is only relevant to your job.

> **[Commands: job dispatch | Nomad | HashiCorp Developer](https://developer.hashicorp.com/nomad/docs/commands/job/dispatch#examples)**
>
> The dispatch command is used to create an instance of a parameterized job.
