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:ย 

Azure data bricks delta tables .Issue

RohitKulkarni
Contributor II

Hello Team,

I have written Spark SQL Query in data bricks :

DROP TABLE IF EXISTS Salesforce.Location;

CREATE EXTERNAL TABLE Salesforce.Location (

Id STRING,

OwnerId STRING,

IsDeleted bigint,

Name STRING,

CurrencyIsoCode STRING,

CreatedDate bigint,

CreatedById STRING,

LastModifiedDate bigint,

LastModifiedById STRING,

SystemModstamp bigint,

LocationType STRING,

Description STRING,

TimeZone STRING,

ParentLocationId STRING,

IsMobile boolean,

IsInventoryLocation boolean,

VisitorAddressId STRING,

RootLocationId STRING,

LocationLevel bigint,

ExternalReference STRING

)

USING data_source

LOCATION 'abfss://xyz@xyz.dfs.core.windows.net/Bronze/Salesforce/Location'

Hello Team,

But I am getting error as :

Error in SQL statement: ClassNotFoundException:

Failed to find data source: data_source.

Please advise.

There mutliple files are present in the below mentioned path :

https://xyz.blob.core.windows.net/xyz/Bronze/Salesforce/Location

Regards

RK

1 ACCEPTED SOLUTION

Accepted Solutions

AmanSehgal
Honored Contributor III

You need to provide one of the following value for 'data_source':

  • TEXT
  • AVRO
  • CSV
  • JSON
  • PARQUET
  • ORC
  • DELTA

eg: USING PARQUET

If you skip USING clause, then the default data source is DELTA

https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-table-using.html

View solution in original post

4 REPLIES 4

AmanSehgal
Honored Contributor III

You need to provide one of the following value for 'data_source':

  • TEXT
  • AVRO
  • CSV
  • JSON
  • PARQUET
  • ORC
  • DELTA

eg: USING PARQUET

If you skip USING clause, then the default data source is DELTA

https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-table-using.html

I am new to databricks.Please can you explain to me with example.

AmanSehgal
Honored Contributor III

CREATE TABLE table_name (

column_name_1 datatype,

column_name_2 datatype,

.

.

.

.

column_name_n datatype,

)

USING data_source

LOCATION <path>

Hi @Rohit Kulkarniโ€‹,

Just a friendly follow-up. Did you have time to test AmanSehgal's sample code? do you still have issues? please let us know

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