cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Version Controlling SQL Query snippets

alexiswl
Contributor

Hello,

I have a suite of SQL Queries for creating table views (i.e)

```

 CREATE OR REPLACE VIEW silver.filtered_samples.metadata_table AS (

  SELECT

*

FROM bronze.samples.table

  WHERE sample_status ='pass'

 )

```

I have tried moving these a repo but I get the error Cannot move DBSQL object into a repo.

What is the best approach? Do I just have to use notebooks with a single '%sql' magic block?

Is support for version controlling SQL queries coming soon? If not, can this be put on the roadmap?

1 ACCEPTED SOLUTION

Accepted Solutions

daniel_sahal
Esteemed Contributor

@Alexis Lucattini​ 

You're right, the best approach would be to use notebooks with a single %sql magic block.

View solution in original post

1 REPLY 1

daniel_sahal
Esteemed Contributor

@Alexis Lucattini​ 

You're right, the best approach would be to use notebooks with a single %sql magic block.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.