title: Polybase to connect local CSV file
body: <p>I'm unable to access a local CSV file from SQL Server 2019 Polybase. This is a simple 3-columned text file. I have also created a local system DSN (from ODBC32 UI). </p>
  
  <p>I got the sample code from <a href="https://www.cdata.com/kb/tech/csv-odbc-polybase.rst" rel="nofollow noreferrer">here</a>. However, the driver in the link (cdata) is not free. Any assistance in solving this issue will be greatly appreciated. </p>
  
  <pre><code>create master key encryption by password = 'Polybase2CSV';
  
  create database scoped credential csv_creds
  with identity = 'username', secret = 'password';
  
  create external data source csv_source
  with ( 
    location = 'odbc://localhost',
    connection_options = 'DSN=CustomerDSN', -- this is the DSN name 
    -- PUSHDOWN = ON | OFF,
    credential = csv_creds
  );
  
  
  CREATE EXTERNAL TABLE Customer
  (
      CUSTOMERID int,
      CUSTOMERNAME varchar(250),
      DEPARTMENT varchar(250)
  ) WITH (
      LOCATION='customer.txt',
      DATA_SOURCE=csv_source
  );
  </code></pre>