提问人:Sangram Keshari 提问时间:11/17/2023 最后编辑:marc_sSangram Keshari 更新时间:11/17/2023 访问量:21
在给定的问题中,路径的含义是什么?[关闭]
What is the meaning of path in the given question? [closed]
问:
摘要:创建一个使用以下架构命名的新表:outdoorProducts
Column Name Type
-------------------
invoiceNo STRING
stockCode STRING
description STRING
quantity INT
invoiceDate STRING
unitPrice DOUBLE
customerID INT
countryName STRING
Steps to complete:
通过删除名称为 .outdoorProducts
使用 csv 作为指定的数据源。
使用上面提供的路径访问数据。
此数据包含标头;将其包含在表创建语句中
drop table if exists outdoorProduct;
create table outdoorProduct
using csv
OPTIONS (
'path' 'C:\Users\sangr\OneDrive\Documents\pivot table', -- Replace with the actual path to your CSV file
'header' 'true',
'inferSchema' 'false'
)
AS
SELECT invoiceNo,
stockCode,
description,
CAST(quantity AS INT) AS quantity,
invoiceDate,
CAST(unitPrice AS DOUBLE) AS unitPrice,
CAST(customerID AS INT) AS customerID,
countryName
FROM
csv.`C:\Users\sangr\OneDrive\Documents\pivot table`;
错误是:
SQL 语句中的错误:AnalysisException: java.net.URISyntaxException:绝对 URI 中的相对路径: C:%5CUsers%5Csangr%5COneDrive%5CDocuments%5Cpivot%20table;18号线 POS 2
答: 暂无答案
评论