Comments (4)
你好,调用的代码和报错的信息可以发一下么?
from lakesoul.
Exception in thread "main" org.apache.spark.sql.AnalysisException: Table s3://ccf-datalake-contest/datalake_table doesn't exist.
spark.sql(
"""
|CREATE TABLE datalake_table (
| uuid string,
| ip string,
| hostname string,
| requests int,
| name string,
| city string,
| job string,
| phonenum string)
| USING lakesoul
|""".stripMargin)
val lakeSoulTable = LakeSoulTable.forPath(tablePath)
lakeSoulTable.upsert(dfSum)
from lakesoul.
sql(
s"""
|CREATE TABLE lakesoul_test(a LONG NOT NULL, b String)
|USING lakesoul
|OPTIONS('path'='${dir.getCanonicalPath}')""".stripMargin)
需要指定path,表会在指定path中存储数据,是不是漏掉了
Seq((1, "a"), (2, "insert")).toDF("id", "change_kind")
.write
.mode("overwrite")
.format("lakesoul")
.option("lakesoul_cdc_change_column", "change_kind")
.save(path)
也可以使用dataframe这种方式建表
代码案例可以参考如下case
https://github.com/meta-soul/LakeSoul/blob/main/lakesoul-spark/src/test/scala/org/apache/spark/sql/lakesoul/DDLSuite.scala
from lakesoul.
使用 SQL 建表时,默认的路径是 spark.sql.warehouse.dir 这个配置指定的,默认是当前运行本地目录下的 spark-warehouse 子目录。可以使用 path 选项或者 LOCATION 语法指定路径。
from lakesoul.
Related Issues (20)
- Built-in RBAC Support
- [Flink] Support filter pushdown to native io
- [NativeIO] Filters should be ignored when file does not contain the field
- [Connectors] Filters accepted by native io should be removed from engine's filter
- Presto Connector
- [Flink] Upgrade cdc connector to 2.4
- [RBAC] Set HDFS Dir permissions during table creation
- [Spark] Catalog.listNamespaces with parameter should return empty array
- [Connectors] Improve connectors capabilities for query engines
- [NativeIO] Support Vectorized Query Engines
- [Spark] Support Gluten Vectorized Engine
- [Deploy/Docs] Environment Setup and Docs
- [Python] Support primary key table read
- [Flink] Support LakeSoul table with range partitions when export to external databases
- [Rust] Datafusion Source & Sink
- [Flink] Upgrade to Flink CDC 3.0 HOT 1
- [Flink] Fix jar package conflict problem when upgrade to Flink CDC 3.0 HOT 1
- [Flink]Support Sqlserver CDC connector HOT 1
- [Rust] DataFusion Catalog Support
- com.dmetasoul.lakesoul.meta.entity not exist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lakesoul.