# How to create a delta table data source on databricks

**URL:** <https://discourse.greatexpectations.io/t/how-to-create-a-delta-table-data-source-on-databricks/799>\
**Category:** Archive\
**Created:** [June 22, 2021, 5:48pm UTC](https://discourse.greatexpectations.io/t/how-to-create-a-delta-table-data-source-on-databricks/799 "2021-06-22T17:48:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nora001](https://avatars.discourse-cdn.com/v4/letter/n/b3f665/32.png) [@nora001](https://discourse.greatexpectations.io/u/nora001)\
**Post date:** [June 22, 2021, 5:48pm UTC](https://discourse.greatexpectations.io/t/how-to-create-a-delta-table-data-source-on-databricks/799/1 "2021-06-22T17:48:41Z")

</div>

Hello,

I’m trying to create a data source for a delta table, I’m working fully on databricks(so I’m not using great\_expectations locally).

my\_spark\_datasource\_config = DatasourceConfig(  
class\_name=“SparkDFDatasource”,  
batch\_kwargs\_generators={  
“subdir\_reader”: {  
“class\_name”: “DatabricksTableBatchKwargsGenerator”,  
“base\_directory”: “delta\_table\_name or path”,  
“reader\_method” : “delta”  
}  
},  
)

But I get the feeling that this is not the way to do it? I feel like adding the directory is not really useful(and addng the path isn’t useful for delta lake since the directory contains snappy.parquet files…), I can just leave it blank(is this bad practice?) and select the rows I want from the delta table into a dataframe and test out the dataframe without indicating the delta table in the first place…but that defeats the purpose of a datasource in the first place, no?

Sorry I’m a noob at using GE and I’m a bit lost reading the documentation
