- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 11:40 PM
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 12:09 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 12:09 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 12:19 AM
I am new to databricks.Please can you explain to me with example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 11:55 PM
CREATE TABLE table_name (
column_name_1 datatype,
column_name_2 datatype,
.
.
.
.
column_name_n datatype,
)
USING data_source
LOCATION <path>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2022 04:25 PM
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