---
title: name (DataSource)
description: "DataSource.name method in PySpark: Returns a string representing the format name of this data source."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/datasource/name
---

# name (DataSource)

Returns a string representing the format name of this data source.

By default, it is the class name of the data source. It can be overridden to provide a customized short name for the data source.

## Syntax

```
name()
```

## Returns

`str`

## Examples

```python
def name(cls):
    return "my_data_source"
```
