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?

daniel_sahal
Databricks MVP

@Alexis Lucattini​ 

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

View solution in original post