# \[BUG\]"columnNames" Parameter Not Working for Tag History

**URL:** <https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402>\
**Category:** Ignition\
**Tags:** python, ignition83, scripting\
**Created:** [November 24, 2025, 8:51pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402 "2025-11-24T20:51:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjadams](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mjadams](https://forum.inductiveautomation.com/u/mjadams)\
**Post date:** [November 24, 2025, 8:51pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/1 "2025-11-24T20:51:01Z")

</div>

Issue Description:

When defining the “columnNames” parameter for the “system.historian.queryAggregatedPoints” function, the resulting dataset does not use the value of “columnNames” for its headers but instead the default header names. I tested this in a Python script within the Reporting module and the Script Console.

Expected Behavior:

The resulting dataset should have its headers replaced with the list of strings defined in “columnNames”. The function does return an exception when the length of the list is not correct, which is expected.

I was able to replicate the “columnNames” functionality with the “setColumnNames” dataset method in my script, but I don’t know why the parameter in the function does not work.

Ignition Version: 8.3.1

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 24, 2025, 9:03pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/2 "2025-11-24T21:03:54Z")

</div>

Please post your test script and see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 24, 2025, 9:13pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/3 "2025-11-24T21:13:57Z")

</div>

~~I think you need to account for the first column in the return dataset. IIRC, it’s a ts/t\_stamp column.~~

~~How many columns are in your return dataset vs your columnNames?~~

Looks like things have changed since I last used the Historian module (8.1). After testing in 8.3.1 you no longer need to include the timestamp column.

---

<div class="post-metadata">

**Author:** ![mjadams](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mjadams](https://forum.inductiveautomation.com/u/mjadams)\
**Post date:** [November 24, 2025, 9:50pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/4 "2025-11-24T21:50:32Z")

</div>

This is the code I was using to test in the Script Console:

```python
histPath = "histprov:NBU_Main_DB:/sys:NBU_Main:/prov:NBU_Main:/tag:_Gateway/Performance/CPU Usage"
tagPath = "[NBU_Main]_Gateway/Performance/CPU Usage"

output1 = system.historian.queryAggregatedPoints(
	paths = [histPath],
	startTime = system.date.addDays(system.date.now(), -1),
	endTime = system.date.now()
)
print("Dataset with default headers: ")
print(output1.getColumnNames())
print(list(output1))

output2 = system.historian.queryAggregatedPoints(
	paths = [histPath],
	startTime = system.date.addDays(system.date.now(), -1),
	endTime = system.date.now(),
	columnNames = [tagPath]
)
print("Dataset with new headers: ")
print(output2.getColumnNames())
print(list(output2))

```

Result:

```plaintext
Dataset with default headers: 
[t_stamp, histprov:NBU_Main_DB:/sys:NBU_Main:/prov:NBU_Main:/tag:_Gateway/Performance/CPU Usage]
[[Sun Nov 23 15:46:41 CST 2025, 0.13377929849728076]]
Dataset with new headers: 
[t_stamp, histprov:NBU_Main_DB:/sys:NBU_Main:/prov:NBU_Main:/tag:_Gateway/Performance/CPU Usage]
[[Sun Nov 23 15:46:41 CST 2025, 0.13377952958085207]]

```

I’m only using one column in columnNames because I get an exception when adding more.

Example:

```python
histPath = "histprov:NBU_Main_DB:/sys:NBU_Main:/prov:NBU_Main:/tag:_Gateway/Performance/CPU Usage"
tagPath = "[NBU_Main]_Gateway/Performance/CPU Usage"

output1 = system.historian.queryAggregatedPoints(
	paths = [histPath],
	startTime = system.date.addDays(system.date.now(), -1),
	endTime = system.date.now()
)
print("Dataset with default headers: ")
print(output1.getColumnNames())
print(list(output1))

output2 = system.historian.queryAggregatedPoints(
	paths = [histPath],
	startTime = system.date.addDays(system.date.now(), -1),
	endTime = system.date.now(),
	columnNames = ["t_stamp", tagPath]
)
print("Dataset with new headers: ")
print(output2.getColumnNames())
print(list(output2))

```

Result:

```plaintext
Dataset with default headers: 
[t_stamp, histprov:NBU_Main_DB:/sys:NBU_Main:/prov:NBU_Main:/tag:_Gateway/Performance/CPU Usage]
[[Sun Nov 23 15:48:34 CST 2025, 0.1348958872269098]]
Java Traceback:
Traceback (most recent call last):
  File "<input>", line 13, in <module>
	at com.inductiveautomation.historian.common.scripting.AbstractHistorianFunctions.queryAggregatedPoints(AbstractHistorianFunctions.kt:200)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: The paths and columnNames lists must be the same size

	at org.python.core.Py.JavaError(Py.java:545)

	at org.python.core.Py.JavaError(Py.java:536)

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:192)

	at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. __call__ (ScriptManager.java:563)

	at org.python.core.PyObject. __call__ (PyObject.java:400)

	at org.python.pycode._pyx42.f$0(<input>:21)

	at org.python.pycode._pyx42.call_function(<input>)

	at org.python.core.PyTableCode.call(PyTableCode.java:173)

	at org.python.core.PyCode.call(PyCode.java:18)

	at org.python.core.Py.runCode(Py.java:1703)

	at org.python.core.Py.exec(Py.java:1747)

	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:277)

	at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:130)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:628)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:616)

	at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)

	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

	at java.desktop/javax.swing.SwingWorker.run(Unknown Source)

	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

	at java.base/java.lang.Thread.run(Unknown Source)

Caused by: java.lang.IllegalArgumentException: The paths and columnNames lists must be the same size

	at com.inductiveautomation.historian.common.scripting.AbstractHistorianFunctions.queryAggregatedPoints(AbstractHistorianFunctions.kt:200)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:190)

	... 18 more

Traceback (most recent call last):
  File "<input>", line 13, in <module>
	at com.inductiveautomation.historian.common.scripting.AbstractHistorianFunctions.queryAggregatedPoints(AbstractHistorianFunctions.kt:200)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: The paths and columnNames lists must be the same size

```

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 25, 2025, 7:55am UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/5 "2025-11-25T07:55:52Z")

</div>

The stacktrace says:

> [@mjadams](#):
>
> `The paths and columnNames lists must be the same size`

Here's why.

Tip: When confronted to a java stacktrace, look for the lines that start with "caused by"

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 25, 2025, 1:54pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/6 "2025-11-25T13:54:36Z")

</div>

After testing in 8.3.1 this doesn’t seem to be the case.

The manual states for columnNames `A list of alias column names for the returned dataset` which isn’t true (it was true for 8.1 at some point). To alleviate future confusion it should note the columnNames length needs to match the **paths** length.

That being said, I could replicate the ~~error~~ issue if histPath contained a capital letter. If the path is all lowercase, then the columnNames work (note: the returned columnNames will also be lowercase).

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/6/c67096cff4d20a649cb39331d68bb733ed32d9cf.png)

@mjadams to test this add .lower() to the histPath. `histPath = "histprov:NBU_Main_DB:/sys:NBU_Main:/prov:NBU_Main:/tag:_Gateway/Performance/CPU Usage".lower()`

---

<div class="post-metadata">

**Author:** ![mjadams](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mjadams](https://forum.inductiveautomation.com/u/mjadams)\
**Post date:** [November 25, 2025, 2:23pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/7 "2025-11-25T14:23:43Z")

</div>

That seems to be the problem. It works for me if the histPath is lowercase.

However, I don’t know if this is intentional or not. The QueryTagHistory function, which is deprecated but still exists in 8.3, had a columnNames parameter, and it works with capital letters.

 ![2025-11-25 08_23_15-Script Console](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/07d0580f5844a3a1cd56926149b6d8fefc051a39.png)

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 25, 2025, 2:30pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/8 "2025-11-25T14:30:37Z")

</div>

FWIW, when displaying datasets you’ll typically use a table or some component that offers column settings to style, adjust, rename columns, etc. Intentional or not, these workarounds are simple to implement.

---

<div class="post-metadata">

**Author:** ![aaustin](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@aaustin](https://forum.inductiveautomation.com/u/aaustin)\
**Post date:** [February 2, 2026, 10:53pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/9 "2026-02-02T22:53:28Z")

</div>

Another (not working) example in Ignition 8.3.2 (the code I have commented out is a good work around for changing the column names until this [BUG] gets fixed):

```python
	sTagPath = "[TestTags]adamtest/ain01/valuecurrent"
	sStartTime = "2026-02-02 16:07:00"
	sEndTime = "2026-02-02 16:17:00"
	dtStart = system.date.parse(sStartTime)
	dtEnd = system.date.parse(sEndTime)
	iDiffSeconds = system.date.secondsBetween(dtStart, dtEnd)
	
	ds = system.historian.queryAggregatedPoints(paths=[sTagPath], startTime=dtStart, endTime=dtEnd, aggregates=["LastValue"], columnNames=["AIN01"], returnSize=iDiffSeconds)
	csv = system.dataset.toCSV(ds)
	#lHeader = ["timestamp","AIN01"]
	#lData = [row for row in ds]
	#dsCSV = system.dataset.toDataset(lHeader, lData)
	#csv = system.dataset.toCSV(dsCSV)
	sFileName = "C:\\Users\\Public\\chartdata20260202.csv"
	system.file.writeFile(sFileName, csv)
	

```

| **Ignition Platform** | `8.3.2 (b2025120210)` | |
| --- | --- | --- |
| **Twilio Integration and Alarm Notification Module** | `4.3.2 (b2025120210)` | Trial |
| **SFC Module** | `6.3.2 (b2025120210)` | Trial |
| **SQL Bridge Module** | `11.3.2 (b2025120210)` | Trial |
| **OpcCom Module** | `7.3.2 (b2025120210)` | Trial |
| **Perspective Module** | `3.3.2 (b2025120210)` | Trial |
| **Reporting Module** | `7.3.2 (b2025120210)` | Trial |
| **Symbol Factory Module** | `8.3.2 (b2025120210)` | Trial |
| **Alarm Notification Module** | `7.3.2 (b2025120210)` | Trial |
| **OPC-UA Module** | `10.3.2 (b2025120210)` | Trial |
| **Enterprise Administration Module** | `5.3.2 (b2025120210)` | Trial |
| **Legacy DNP3 Driver Module** | `5.3.2 (b2025120210)` | Trial |
| **Historian Core Module** | `1.3.2 (b2025120210)` | Trial |
| **Vision Module** | `12.3.2 (b2025120210)` | Trial |

- **Connected Gateway** : [http://localhost:8088](http://localhost:8088)

- **Java Version** : Azul Systems, Inc. 17.0.16

- **JVM Memory (used/max MB)**: 814.0 / 1,024.0

- **Client Time Zone** : America/Chicago [GMT-6:00]

- **Gateway Time Zone** : America/Chicago [GMT-6:00]

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [February 3, 2026, 12:36pm UTC](https://forum.inductiveautomation.com/t/bug-columnnames-parameter-not-working-for-tag-history/112402/10 "2026-02-03T12:36:13Z")

</div>

If this is the same bug fixed in 8.3.4 for queryRawPoints then you might see if the RC or nightly version fixed it. Stable version should release later this month.
