# Need advise on adding tags to Ignition

**URL:** <https://forum.inductiveautomation.com/t/need-advise-on-adding-tags-to-ignition/99143>\
**Category:** Ignition\
**Created:** [November 26, 2024, 7:02pm UTC](https://forum.inductiveautomation.com/t/need-advise-on-adding-tags-to-ignition/99143 "2024-11-26T19:02:01Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [November 26, 2024, 8:17pm UTC](https://forum.inductiveautomation.com/t/need-advise-on-adding-tags-to-ignition/99143/5 "2024-11-26T20:17:33Z")

</div>

> [@Grigory\_Vogman](#):
>
> Can you tell me more or direct me to a resource to learn more about this?

> **[system.dataset.toDataSet | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-dataset/system-dataset-toDataSet#syntax---create-from-list)**
>
> This function is used to 1. Convert PyDataSets to DataSets 2. Create new datasets from raw Python lists. When creating a new dataset, headers should have unique names.

That's the manual page on the function to create a new dataset.

Just to confirm, is this an actual CSV file or is it an excel file (.xls or .xlsx) with the data formatted in the same way as a CSV?

You can do a search for `CSV to dataset` here on the forums and get some decent information.

[https://forum.inductiveautomation.com/search?q=csv%20to%20dataset](https://forum.inductiveautomation.com/search?q=csv%20to%20dataset)

This post looks like it has a basic script for converting csv to dataset:

> [@Upload csv to dataset](https://forum.inductiveautomation.com/t/upload-csv-to-dataset/79797/2):
>
> Figured it out, Not sure why I got hung up like I did. If anyone else gets stuck: the following class can parse csv files and store as a dataset: class CSVParser: def \_\_init\_\_(self, file\_in): self.file = file\_in self.file\_string = file\_in.getString() self.rows = [row.split(',') for row in self.file\_string.split('\r')] self.num\_cols = max([len(row) for row in self.rows]) self.num\_rows = len(self.rows) self.headers = self.rows[0] self.data = self.rows[1:] @property def extend…

That class is expecting the result from a file upload component, you would need to modify it to accept the output of [`system.file.readFileAsString`](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-file/system-file-readFileAsString)

> [@Grigory\_Vogman](#):
>
> I hope to create a script to populate the CSV periodically

What is the source of this CSV? Is it being exported from some other program? If so it may be worth seeing if you can get this program to dump this data into a database table. That would make things simpler as you could use a query tag to hold the information and eliminate the script on Ignition's side.

I also understand that you may be limited to only CSV files. My company has several CSV files that we use Ignition to parse and chuck into a DB table on a weekly or daily basis.

---

_[View the full topic](https://forum.inductiveautomation.com/t/need-advise-on-adding-tags-to-ignition/99143)._
