I would have posted this in the ideas section but I can't seem to figure out how to do that anymore since Matillion redesigned its website - not an improvement by the way.
The ability to load text for the table definition is a step in the right direction but I am still unable to use this component as I have naming standards on my database and this the create table component does not allow me to control the primary key name.
I would like the ability to define an name for the primary key, also any referential integrity constraints to other tables within the components. Ideally, the component would allow me to use a component variable ${TableName} to define a standard format - for example:
${TableName}$PK
Hi @knorman
Thanks for your post and the feedback, I have passed that on to my team to look into. I have also reached out to my colleagues with regard to your idea, just to check there is no workaround or alternative way to achieve this, I will let you know as soon as they get back to me following some investigating into that.
Also thanks to your heads up we did notice there was an issue with the log in button on the Ideas section of the community, this has now been fixed, thank you for bringing this to light for us.
If you need anything else, please let me know. I will be back in touch soon.
Kind regards, Joe
Hi @knorman
I spoke with a member of our team as mentioned who advised this is achievable using the SQL Script component in an orchestration job to create the table manually.
- use the create table component to define their table, lift the SQL from that component, drop it in the SQL Script component and edit as needed or;
- create the table using the create table component without any constraints and the use the component to enter the relevant SQL to add these constraints as they want them to appear. So, if they create a table called test_table with two columns called col1 and col2 they could run the script SQL Script to run this SQL - ALTER TABLE "test_table" ADD CONSTRAINT col1_pk PRIMARY KEY("col1") to add the named primary key to the table.
I hope that helps, please do keep us posted on how you get on.
Kind regards, Joe
I already use the SQL script for all my DDL because the current create table component is limited. My ask was to make it more feature rich so that it would actually become usable.