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
Contributor

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.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now