spark中创建的数据库去哪了?

数据挖掘 天蓝色毫升
2022-03-09 02:00:33

我正在关注本教程:https ://docs.microsoft.com/en-us/learn/modules/intro-to-azure-databricks/4-using-notebooks

在本教程中,我们创建一个这样的数据库:

%sql

CREATE DATABASE IF NOT EXISTS Databricks;
USE Databricks;

CREATE TABLE IF NOT EXISTS AirlineFlight
USING CSV
OPTIONS (
  header="true",
  delimiter=",",
  inferSchema="true",
  path="dbfs:/mnt/training/asa/flights/small.csv"
);

CACHE TABLE AirlineFlight;

SELECT * FROM AirlineFlight;

这个数据库是在哪里创建的?此外还有一个问题

Question: Which of the following are good applications for Apache Spark? (Select all that apply.)

Querying, exploring, and analyzing very large files and data sets
Joining data lakes
Machine learning and predictive analytics
Processing streaming data
Graph analytics
Overnight batch processing of very large files
Updating individual records in a database
Answer: All but #7. Apache Spark uses SQL to read and performs analysis on large files, but it is not a Database.

如果我们可以使用 spark 创建数据库,那么为什么我们不能也更改它的记录

1个回答

这个数据库是在哪里创建的?

现代数据存储和处理的一个强大范例是计算和存储的分离。使用解耦的计算和存储构建系统具有与可扩展性、可用性和成本相关的优势。

Apache Spark 加载并对数据执行计算——它是一个分布式数据处理引擎。它不处理永久存储。在 Databricks(您正在使用 databricks 文档)中,数据通常存储在 Delta Lake 中,该湖专门设计用于与 Spark 一起使用。但是,Spark 可以处理以许多其他方式存储的数据,例如其他云存储(例如 Amazon S3、Azure Blob)、传统 SQL 数据库、NoSQL 数据库、HDFS 等等。