Home » Create a Schema and table in Azure Data Lake Database

Create a Schema and table in Azure Data Lake Database

Create a Schema and table in Azure Data Lake Database





To create a Schema and table in Azure Data Lake, first you must have a database.

You can create a database and if you do not know how to create one, you can refer the post Create Database in Azure Data Lake.

Lets create a schema and tables in Azure data lake database.

Go to Home page, select ResourceGroup under that click on Data Lake Analytics Account, here we have an account named as azuredatalakeacc.

Next click on New Job.

 

 

After that, a New Job page opens, next specify a name for jobs, named as createtable.

In code editor, now we will write a U-SQL Scripts that creates a schema named as Stud, and a table named as studentInfo under the schema in Database Db_Live.

 

USE DATABASE Db_live;

CREATE SCHEMA IF NOT EXISTS Stud;

CREATE TABLE Stud.StudentInfo

(

    StudID int,

    StudName string,

    StudAddress String,

    RegDate DateTime,

    INDEX idx_StudID CLUSTERED(StudID ASC) DISTRIBUTED BY HASH(StudID)

);
After providing a Job names, and writing create schema and table queries click on Submit button.
Once you click on Submit button, A jobs is executed and you will see a job status as succeeded when job is completed successfully.
Now go back to Data Analytics Account, then click on Data Explorer, under that click on U-SQL catalog.
Then click on Database Db_Live, You will see a table StudentInfo that you created.
If you want to see the columns that you have in table, just expand the Database db_Live and click on columns.
Also Read..
SQL Basics TutorialSQL Advance TutorialSSRSInterview Q & A
SQL Create tableSQL Server Stored ProcedureCreate a New SSRS Project List Of SQL Server basics to Advance Level Interview Q & A
SQL ALTER TABLESQL Server MergeCreate a Shared Data Source in SSRSSQL Server Question & Answer Quiz
SQL DropSQL Server PivotCreate a SSRS Tabular Report / Detail Report
..... More.... More....More
Power BI TutorialAzure TutorialPython TutorialSQL Server Tips & Tricks
Download and Install Power BI DesktopCreate an Azure storage accountLearn Python & ML Step by stepEnable Dark theme in SQL Server Management studio
Connect Power BI to SQL ServerUpload files to Azure storage containerSQL Server Template Explorer
Create Report ToolTip Pages in Power BICreate Azure SQL Database ServerDisplaying line numbers in Query Editor Window
....More....More....More




 

 1,476 total views,  5 views today

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.