# Create table by Spec: Node or Workflow ?

**URL:** <https://forum.knime.com/t/create-table-by-spec-node-or-workflow/27471>\
**Category:** KNIME Analytics Platform\
**Created:** [September 18, 2020, 6:18am UTC](https://forum.knime.com/t/create-table-by-spec-node-or-workflow/27471 "2020-09-18T06:18:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim8200](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/t/779978/32.png) [@Tim8200](https://forum.knime.com/u/Tim8200)\
**Post date:** [September 18, 2020, 6:18am UTC](https://forum.knime.com/t/create-table-by-spec-node-or-workflow/27471/1 "2020-09-18T06:18:50Z")

</div>

Hello guys,

i have to create an empty table with column names and defined data types. I don’t want to do this manually. I would like to use an extra specification table. So I need the opposite of the node: Extract table Spec  Create Table by Spec…  
**Schematic representation:**

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/1/0/10eee89ce0837f7ae535f209818bca90fe2e0e71.png)

Is that possible, can anybody help me?  
Greetings Tim

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [September 18, 2020, 8:23am UTC](https://forum.knime.com/t/create-table-by-spec-node-or-workflow/27471/2 "2020-09-18T08:23:06Z")

</div>

Of course you could just create a KNIME tase from scratch and define the types of the columns - or if you have an existing file you could just use that and remove all lines with data …

And then you might create a Table in a SQL database like H2 from code and then bring that to KNIME. If you are into coding.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/d/9/d9e4f7327869ffab62dfa79feeacfa3ed24df089.png)

> **[Example how to use H2 database to create table with upload and from scratch –...](https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_db_h2_create_table_from_scratch)**
>
> Example how to use H2 database to create table with upload and from scratch

---

<div class="post-metadata">

**Author:** ![Tim8200](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/t/779978/32.png) [@Tim8200](https://forum.knime.com/u/Tim8200)\
**Post date:** [September 21, 2020, 2:58pm UTC](https://forum.knime.com/t/create-table-by-spec-node-or-workflow/27471/3 "2020-09-21T14:58:58Z")

</div>

i create the table “by hand”…  
The other options are not working in my cases…

Thanks.

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [September 21, 2020, 4:26pm UTC](https://forum.knime.com/t/create-table-by-spec-node-or-workflow/27471/4 "2020-09-21T16:26:05Z")

</div>

Not sure I do follow. If you have an existing table within KNIME (wherever that came from, maybe from importing an Excel file). Would it not be possible so simply remove all lines and just use that as an empty table?

If you want to define the types by some sort of meta file I would have to think about some sort of loop to simulate the creation of a table by hand. But I am not sure if this is worth the effort.

Maybe you could tell us more about what you want to do.

---

<div class="post-metadata">

**Author:** ![Tim8200](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/t/779978/32.png) [@Tim8200](https://forum.knime.com/u/Tim8200)\
**Post date:** [October 7, 2020, 3:01pm UTC](https://forum.knime.com/t/create-table-by-spec-node-or-workflow/27471/5 "2020-10-07T15:01:32Z")

</div>

Hey mlauber.  
of course it possible to create and load some data and remove all the lines. But I don’t want to this. I want to create the table in a workflow comparable to the first initialization of a table in a database. Anyway i thought that i overlooked something because there is a “extract table spec” node but no “create table by spec” node.  
But i agree with you it’s not worth the effort to create some sort of loop to simulate the creation of a table by hand.  
Thank you…  
Greetings Tim

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 8, 2021, 3:02am UTC](https://forum.knime.com/t/create-table-by-spec-node-or-workflow/27471/6 "2021-04-08T03:02:23Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
