HDInsight Tools for VSCode - an extension for developing Hive Interactive Query, Hive Batch Job and PySpark Job against [Microsoft HDInsight]! This extension provides you a cross-platform, light-weight, keyboard-focused authoring experience for Hive & Spark development.
- A HDInsight cluster. To create a cluster, see [Get started with HDInsight].
- [Mono]. Mono is only required for Linux and MacOS.
Azure HDInsight Tools for VSCode will only be activated when you either create a new .hql/.hive/.py File or open an existing .hql/.hive/.py file.
You can activate Azure HDInsight Tools for VSCode via creating a new .hql/.hive/.py File or opening an existing .hql/.hive/.py file.
Open HDInsight work folder
From Visual Studio Code, Click the File menu, and then click Open Folder.
Specify or Create a new folder, and then click Select Folder.
Click the New File under your created work folder, or click the File menu, and then click New File. An Untilted-1 file is shown in the right pane.
Connect to HDInsight Cluster
We provide two ways to manage your HDInsight cluster: Connect to Azure (HDInsight: Login) and Link a Cluster
Connect to Azure (HDInsight: Login)
Before you can submit scripts to HDInsight cluster, you need connect to your Azure account.
Create a new work folder and a new script file if you don't have one.
Right-click a hive script editor, and then click HDInsight: Login. You can also use another way of pressing CTRL+SHIFT+P and entering HDInsight: Login.
![HDInsight Tools for Visual Studio Code log in]
Choose one of the Azure Environment based on your subscription.
![HDInsight Tools for Visual Studio Code login options]
To sign in, follow the sign-in instructions in the OUTPUT pane.
- For Azure global environment, HDInsight: Login command will trigger Sign in to Azure action in the HDInsight explorer and vice versa.
![HDInsight Tools for Visual Studio Code global login info]
- For Other environments, follow the sign-in instructions.
![HDInsight Tools for Visual Studio Code other login info]
Follow the instructions to sign in from the web page. Once connected, your Azure account name is shown on the status bar at the left-bottom of the VSCode window.
If your account has two factors enabled, it is recommended to use phone authentication instead of Pin.
There is an known issue about Azure login. Recommend using Chrome.
Link a cluster
You can link a normal cluster by using Ambari managed username, also link a security hadoop cluster by using domain username (such as: email@example.com).
- Open the command palette by selecting CTRL+SHIFT+P, and then enter HDInsight: Link a cluster.