---
title: CREATE_FILE_ILLEGAL_USAGE error condition
description: Documentation for the CREATE\_FILE\_ILLEGAL\_USAGE error condition on Databricks
canonical_url: https://docs.databricks.com/gcp/en/error-messages/create-file-illegal-usage-error-class
---

# CREATE\_FILE\_ILLEGAL\_USAGE error condition

[SQLSTATE: 22023](https://docs.databricks.com/gcp/en/error-messages/sqlstates.md#class-22-data-exception)

Illegal usage of `CREATE_FILE`.

## DESTINATION\_PATH\_PROVIDED

The data is being written to a `MANAGED` FILE column, which is managed by the system. Remove the destinationPath option.

## DESTINATION\_PATH\_REQUIRED

The data is being written to an `EXTERNAL` FILE column. A destination path inside a Volume is required.

## IF\_FILE\_EXISTS\_MODE

Unrecognized mode for if\_file\_exists: `<input>`. Supported modes are: "error", "skip", and "overwrite".

## IF\_FILE\_EXISTS\_TYPE

if\_file\_exists needs to be a string literal. Found `<className>`.

## IF\_FILE\_EXISTS\_WITHOUT\_DESTINATION

If\_file\_exists can only be set if a destination\_path is provided.
