# Is DataTableFunctionLibrary "get data table column as string()" broken?

**URL:** <https://forums.unrealengine.com/t/is-datatablefunctionlibrary-get-data-table-column-as-string-broken/248865>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [September 3, 2021, 6:48pm UTC](https://forums.unrealengine.com/t/is-datatablefunctionlibrary-get-data-table-column-as-string-broken/248865 "2021-09-03T18:48:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![skunkiferous](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/skunkiferous/32/252186_2.png) [@skunkiferous](https://forums.unrealengine.com/u/skunkiferous)\
**Post date:** [September 3, 2021, 6:48pm UTC](https://forums.unrealengine.com/t/is-datatablefunctionlibrary-get-data-table-column-as-string-broken/248865/1 "2021-09-03T18:48:35Z")

</div>

I’m trying to work out how to read the data of a DataTable _with Python_. My code starts with the “asset path” for the DataTable.

I would have thought you would use DataTableRowHandle, but I can’t actually find any “use” for it, and it doesn’t seem to have any method that returns the “content” of the row either. In other words, it’s basically useless in Python atm.

Although I haven’t yet found a way to list the “column names” of a DataTable, or the “fields” of the underlying UserDefinedStruct in Python. at least, the doc talks about “DataTableFunctionLibrary.get\_data\_table\_column\_as\_string()”. Unfortunately, it doesn’t even seem to work. Am I doing something wrong, or is it buggy?

```auto
datatable_func_lib = unreal.DataTableFunctionLibrary()
string_lib = unreal.StringLibrary()
editor_asset_lib = unreal.EditorAssetLibrary()

# Path to table
asset_path = ...
# The table object
table = editor_asset_lib.load_asset(asset_path)

# Name of desired table column, as String
col_name_str = 'my_col'
# Name of desired table column, as Name
col_name = string_lib.conv_string_to_name(col_name_str)

# This works
row_names = datatable_func_lib.get_data_table_row_names(table)
# This is always an empty array
my_col_values = datatable_func_lib.get_data_table_column_as_string(table, col_name)

```

Off-Topic: Why am I not allowed to post, if I use “DataTableFunctionLibrary.get\_data\_table\_column\_as\_string()” in the _title_?!?

---

<div class="post-metadata">

**Author:** ![dpotuznik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dpotuznik](https://forums.unrealengine.com/u/dpotuznik)\
**Post date:** [September 11, 2021, 7:57am UTC](https://forums.unrealengine.com/t/is-datatablefunctionlibrary-get-data-table-column-as-string-broken/248865/2 "2021-09-11T07:57:57Z")

</div>

hi ,  
do you found a solution ?

have a nice day  
Daniel

---

<div class="post-metadata">

**Author:** ![skunkiferous](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/skunkiferous/32/252186_2.png) [@skunkiferous](https://forums.unrealengine.com/u/skunkiferous)\
**Post date:** [September 11, 2021, 12:37pm UTC](https://forums.unrealengine.com/t/is-datatablefunctionlibrary-get-data-table-column-as-string-broken/248865/3 "2021-09-11T12:37:43Z")

</div>

Depends on what you call a solution. As you can see, nobody else replied, so I assume it’s just not possible. So I gave up and started reading the “source” CSV files instead. As long as both are kept in sync, which is only easy for me because I’m the only dev, than I access the data that way.

---

<div class="post-metadata">

**Author:** ![dpotuznik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dpotuznik](https://forums.unrealengine.com/u/dpotuznik)\
**Post date:** [September 11, 2021, 1:45pm UTC](https://forums.unrealengine.com/t/is-datatablefunctionlibrary-get-data-table-column-as-string-broken/248865/4 "2021-09-11T13:45:23Z")

</div>

hi

thank for your reply,  
i tried your code and it’s working for me

but is a little strange you can’t loop each line!

Have a nice day.  
Daniel

```auto
import unreal

datatable_func_lib = unreal.DataTableFunctionLibrary()
string_lib = unreal.StringLibrary()
editor_asset_lib = unreal.EditorAssetLibrary()

# Path to table
asset_path ='/Game/montreKF/c4d/K_F_Eight_refV2/NewDataTable.NewDataTable'
# The table object
table = editor_asset_lib.load_asset(asset_path)

# Name of desired table column, as String
col_name_str = 'Filter'
col_name_str2 = 'Material'
# Name of desired table column, as Name
col_name = string_lib.conv_string_to_name(col_name_str)
col_name2 = string_lib.conv_string_to_name(col_name_str2)

# This works
row_names = datatable_func_lib.get_data_table_row_names(table)
# This is always an empty array
my_col_values = datatable_func_lib.get_data_table_column_as_string(table, col_name)
my_col_values2 = datatable_func_lib.get_data_table_column_as_string(table, col_name2)

print(row_names)
print(my_col_values)
print(my_col_values2)

```

i create my structure:

 ![structure](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/2/f2e6b9b40cbbbc1479eca31c20105dae118d7d03.png)

create a DataTable from my structure:

 ![data](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/4/a45b570e022a1d3569a1d4175a192fabfeefa357.png)

Log from your script:

 ![log](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/4/34a3f57625eae0bcf4bd0579cf386dc0ac3fb90c.png)

---

<div class="post-metadata">

**Author:** ![UE\_FlavienP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ue_flavienp/32/1194546_2.png) [@UE\_FlavienP](https://forums.unrealengine.com/u/UE_FlavienP)\
**Post date:** [October 8, 2021, 4:42pm UTC](https://forums.unrealengine.com/t/is-datatablefunctionlibrary-get-data-table-column-as-string-broken/248865/5 "2021-10-08T16:42:38Z")

</div>

There is a getDataTableRow function in the blueprint but it is not exposed in python.  
There might be some technical limitations preventing to expose it.  
I logged it in the system [Unreal Engine Issues and Bug Tracker (UE-131103)](https://issues.unrealengine.com/issue/UE-131103).

---

<div class="post-metadata">

**Author:** ![akane2002](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@akane2002](https://forums.unrealengine.com/u/akane2002)\
**Post date:** [May 15, 2023, 7:23am UTC](https://forums.unrealengine.com/t/is-datatablefunctionlibrary-get-data-table-column-as-string-broken/248865/6 "2023-05-15T07:23:25Z")

</div>

It might be a late reply. But this worked for me:  
my\_col\_values = datatable\_func\_lib.get\_data\_table\_column\_as\_string(table, unreal.Name(“col\_name”))
