Reputation: 3696
I'm using the Python SDK to create a TDE file. I want to add multiple tables to the TDE file. So I tried doing that but I got a duplicate name error:
dataextract.Exceptions.TableauException: TableauException (303): duplicate table name
No problemo, I changed the name so that it counts up with each table I create:
tde_table = tde_file.addTable('Extract'+str(i), table_definition)
but then I get a new and exciting error:
dataextract.Exceptions.TableauException: TableauException (303): table name must be "Extract"
Perhaps Extracts created through the SDK cannot have more than one table per extract? If every table in an extract needs to be named the same thing, but they can't have duplicate names... I'm confused. Can someone help clarify this for me?
Here's all the relevant code I think, but I don't know if it'll be much help:
...
for i, df in enumerate(dataframes):
table_return_list = _form_table_definition(df,data_types,read_out)
table_definition = table_return_list[0]
header_type_map = table_return_list[1]
#use the table definition to create the table and row
tde_table = tde_file.addTable('Extract'+str(i), table_definition)
tde_row = tde.Row(table_definition)
...
Upvotes: 1
Views: 355
Reputation: 3696
Seems that it's impossible at the present moment to add more than one table to a data extract through the Python SDK. I don't know otherwise.
From their SDK documentation:
def tableausdk.Extract.Extract.addTable ( self, name, tableDefinition ) Adds a table to the extract.
Parameters
self The object pointer.
name The name of the table to add. Currently, this method can only add a table named "Extract".
Upvotes: 1