load data from tempview to table in databricks

Shambhu Rai 1,411 Reputation points
2023-12-06T11:37:16.04+00:00

Hi Expert,

How to load the data from temp_view to table in databricks

---View Creation

%sql

create or replace view test as

select * from table1

now how to load the data from view to table level

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,466 questions
Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
524 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,175 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,660 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 89,296 Reputation points Microsoft Employee
    2023-12-07T06:12:00.2+00:00

    @Shambhu Rai - Thanks for the question and using MS Q&A platform.

    You can load data from tempview to table in databricks as shown below:

    Create a tempview directly from the dataframe created.

    User's image

    Create a tempview from the table created in the database.

    User's image

    For more details, refer to Azure Databricks - CREATE VIEW and Temporary View in Databricks.

    And also, checkout the Difference between CREATE TEMPORARY VIEW vs Createorreplacetempview in spark databricks.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.