cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Is there a way to create a local CSV file by creating a local external table?

WWoman
New Contributor III

Hello,

I have a user that would like to create a CSV file on their local file system by creating an external table (USING CSV) and specifying a local file for the path parameter using SQL. They will be running this command from a local client (DbVisualizer) and would like to create the CSV file on their local filesystem.

I know this can be accomplished using python, but we need a solution using SQL. Is this possible?

 

 

2 REPLIES 2

Rishabh-Pandey
Esteemed Contributor

Creating a CSV file on a local filesystem directly using SQL commands isn't typically supported in most SQL databases because SQL, by design, is not intended to interact with the local file system directly from a client like DbVisualizer. SQL is generally used for querying and managing data within a database server environment rather than interacting with local files on a client machine.

Rishabh Pandey

-werners-
Esteemed Contributor III

not sure if this would work, but you could run Unity Catalog locally (possible since last week) and define the csv file as a table in that local UC. then query it.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group