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?

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now