# Access field name with space in config?

**URL:** <https://discuss.elastic.co/t/access-field-name-with-space-in-config/64383>\
**Category:** Logstash\
**Created:** [October 30, 2016, 7:51pm UTC](https://discuss.elastic.co/t/access-field-name-with-space-in-config/64383 "2016-10-30T19:51:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![glagidse](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@glagidse](https://discuss.elastic.co/u/glagidse)\
**Post date:** [October 30, 2016, 7:51pm UTC](https://discuss.elastic.co/t/access-field-name-with-space-in-config/64383/1 "2016-10-30T19:51:56Z")

</div>

I assign field names in from a csv into columns, one of them is called "Primary Key"

I've tried a lot of combinations, but I can't figure out how to assign it to the document index.

```
document_id => "%{Primary Key}"

```

just %{Primary Key} appears, I've been searching for an hour now, thought I'd ask.

---

<div class="post-metadata">

**Author:** ![glagidse](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@glagidse](https://discuss.elastic.co/u/glagidse)\
**Post date:** [October 30, 2016, 8:41pm UTC](https://discuss.elastic.co/t/access-field-name-with-space-in-config/64383/2 "2016-10-30T20:41:58Z")

</div>

It was fucking case sensitivity, seriously, why does

```
%{Primary Key}

```

even work if it can't find the variable? For what reason should a programming language go "Oh, this variable doesn't exist, you probably meant it to be a string then".

---

<div class="post-metadata">

**Author:** ![mut3](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@mut3](https://discuss.elastic.co/u/mut3)\
**Post date:** [April 10, 2017, 4:37pm UTC](https://discuss.elastic.co/t/access-field-name-with-space-in-config/64383/3 "2017-04-10T16:37:38Z")

</div>

This is not a programming language, simply a format string with some nifty variable expansion, the developers elected to have the expansion variable print verbosely if it did not find a match in the event keyspace, presumably so that having a `%{` somewhere in the string didn't break everything

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:27am UTC](https://discuss.elastic.co/t/access-field-name-with-space-in-config/64383/4 "2017-07-06T04:27:13Z")

</div>

Closed on July 6, 2017, 4:27am UTC


