cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to use identifier() as reference

standup1
Contributor

Hello,

i am trying to build some dynamic sql scripts using this identifier() clause. This works fine when it is used with [ select * from identifier (mytable) ]. However, when I try to use this identifier as a reference to a foreign key table, it doesnโ€™t work. For example,

CONSTRAINT s_t_fk FOREIGN KEY(fk1) REFERENCES identifier(mytable).

 Any idea how to use an identifier() or a variable when referencing to table? I am using sql warehouse. Not spark sql. Thank you 

1 REPLY 1

stil
New Contributor II

Is this something you are working to resolve?

We would also like to use IDENTIFIER() with our REFERENCE(s) CONSTRAINT(s)


If not - is it possible to get an explaination why the limitation exists?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group