Can't create a managed foreign key table in Azure Data Lake

I've looked at the documentation when creating tables, but so far no example has been mentioned on how to add a foreign key when creating a table. Also I check the documentation for Alter expression, but the same thing happens with this one.

  CREATE TABLE Brand (
            BrandId          int,            
            Name         string,
            AddressId           int,
            SuperAdminDetails string,
           CONSTRAINT FK_Address FOREIGN KEY (AddressId) REFERENCES Address(AddressId) ,

            INDEX Brand_idx CLUSTERED (BrandId ASC) 
                  PARTITIONED BY HASH (BrandId)
  );


  // ALTER TABLE Brand ADD CONSTRAINT FK_Address FOREIGN KEY (AddressId) REFERENCES Address(AddressId) ;

      

Error while executing over USQL

enter image description here

+3


source to share


1 answer


U-SQL according to the documentation does not currently support foreign keys. If you need this feature, consider hosting your data in an Azure SQL Database (which supports foreign keys) and using federated queries to query the data where it lives. Alternatively, consider making a feedback request:



https://feedback.azure.com/forums/327234-data-lake/filters/hot?page=2

+1


source







All Articles