---
title: jdbc (DataFrameWriter)
description: "DataFrameWriter.jdbc method in PySpark: Saves the content of the DataFrame to an external database table via JDBC."
canonical_url: https://docs.databricks.com/aws/en/pyspark/reference/classes/dataframewriter/jdbc
---

# jdbc (DataFrameWriter)

Saves the content of the `DataFrame` to an external database table via JDBC.

## Syntax

```
jdbc(url, table, mode=None, properties=None)
```

## Parameters

| Parameter    | Type           | Description                                                                                                                                                   |
| ------------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `url`        | str            | The JDBC URL of the form `jdbc:subprotocol:subname`.                                                                                                          |
| `table`      | str            | The name of the table in the external database.                                                                                                               |
| `mode`       | str, optional  | The behavior when data already exists. Accepted values are `'append'`, `'overwrite'`, `'ignore'`, and `'error'` or `'errorifexists'` (default).               |
| `properties` | dict, optional | A dictionary of JDBC database connection arguments. Typically includes `'user'` and `'password'`, for example `{'user': 'SYSTEM', 'password': 'mypassword'}`. |

## Returns

None

## Notes

Avoid creating too many partitions in parallel on a large cluster, as this can crash external database systems.
