mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
notebook linebreak update (#7614)
This commit is contained in:
@@ -66,22 +66,22 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"import pandas,sys,os,json,html,getpass,time\r\n",
|
||||
"pandas_version = pandas.__version__.split('.')\r\n",
|
||||
"pandas_major = int(pandas_version[0])\r\n",
|
||||
"pandas_minor = int(pandas_version[1])\r\n",
|
||||
"pandas_patch = int(pandas_version[2])\r\n",
|
||||
"if not (pandas_major > 0 or (pandas_major == 0 and pandas_minor > 24) or (pandas_major == 0 and pandas_minor == 24 and pandas_patch >= 2)):\r\n",
|
||||
" sys.exit('Please upgrade the Notebook dependency before you can proceed, you can do it by running the \"Reinstall Notebook dependencies\" command in command palette (View menu -> Command Palette…).')\r\n",
|
||||
"def run_command(command):\r\n",
|
||||
" print(\"Executing: \" + command)\r\n",
|
||||
" !{command}\r\n",
|
||||
" if _exit_code != 0:\r\n",
|
||||
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\r\n",
|
||||
" print(f'Successfully executed: {command}')\r\n",
|
||||
"\r\n",
|
||||
"run_command('kubectl version --client=true')\r\n",
|
||||
"run_command('azdata --version')\r\n",
|
||||
"import pandas,sys,os,json,html,getpass,time\n",
|
||||
"pandas_version = pandas.__version__.split('.')\n",
|
||||
"pandas_major = int(pandas_version[0])\n",
|
||||
"pandas_minor = int(pandas_version[1])\n",
|
||||
"pandas_patch = int(pandas_version[2])\n",
|
||||
"if not (pandas_major > 0 or (pandas_major == 0 and pandas_minor > 24) or (pandas_major == 0 and pandas_minor == 24 and pandas_patch >= 2)):\n",
|
||||
" sys.exit('Please upgrade the Notebook dependency before you can proceed, you can do it by running the \"Reinstall Notebook dependencies\" command in command palette (View menu -> Command Palette…).')\n",
|
||||
"def run_command(command):\n",
|
||||
" print(\"Executing: \" + command)\n",
|
||||
" !{command}\n",
|
||||
" if _exit_code != 0:\n",
|
||||
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\n",
|
||||
" print(f'Successfully executed: {command}')\n",
|
||||
"\n",
|
||||
"run_command('kubectl version --client=true')\n",
|
||||
"run_command('azdata --version')\n",
|
||||
"run_command('az --version')"
|
||||
],
|
||||
"metadata": {
|
||||
@@ -345,7 +345,7 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### **Connect to SQL Server Master instance in Azure Data Studio**\r\n",
|
||||
"### **Connect to SQL Server Master instance in Azure Data Studio**\n",
|
||||
"Click the link below to connect to the SQL Server Master instance of the SQL Server 2019 Big Data Cluster."
|
||||
],
|
||||
"metadata": {
|
||||
@@ -355,11 +355,11 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\r\n",
|
||||
"if sqlEndpoints and len(sqlEndpoints) == 1:\r\n",
|
||||
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\r\n",
|
||||
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\r\n",
|
||||
"else:\r\n",
|
||||
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\n",
|
||||
"if sqlEndpoints and len(sqlEndpoints) == 1:\n",
|
||||
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\n",
|
||||
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\n",
|
||||
"else:\n",
|
||||
" sys.exit('Could not find the SQL Server Master instance endpoint.')"
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
@@ -65,21 +65,21 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"import pandas,sys,os,json,html,getpass,time\r\n",
|
||||
"pandas_version = pandas.__version__.split('.')\r\n",
|
||||
"pandas_major = int(pandas_version[0])\r\n",
|
||||
"pandas_minor = int(pandas_version[1])\r\n",
|
||||
"pandas_patch = int(pandas_version[2])\r\n",
|
||||
"if not (pandas_major > 0 or (pandas_major == 0 and pandas_minor > 24) or (pandas_major == 0 and pandas_minor == 24 and pandas_patch >= 2)):\r\n",
|
||||
" sys.exit('Please upgrade the Notebook dependency before you can proceed, you can do it by running the \"Reinstall Notebook dependencies\" command in command palette (View menu -> Command Palette…).')\r\n",
|
||||
"def run_command(command):\r\n",
|
||||
" print(\"Executing: \" + command)\r\n",
|
||||
" !{command}\r\n",
|
||||
" if _exit_code != 0:\r\n",
|
||||
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\r\n",
|
||||
" print(f'Successfully executed: {command}')\r\n",
|
||||
"\r\n",
|
||||
"run_command('kubectl version --client=true')\r\n",
|
||||
"import pandas,sys,os,json,html,getpass,time\n",
|
||||
"pandas_version = pandas.__version__.split('.')\n",
|
||||
"pandas_major = int(pandas_version[0])\n",
|
||||
"pandas_minor = int(pandas_version[1])\n",
|
||||
"pandas_patch = int(pandas_version[2])\n",
|
||||
"if not (pandas_major > 0 or (pandas_major == 0 and pandas_minor > 24) or (pandas_major == 0 and pandas_minor == 24 and pandas_patch >= 2)):\n",
|
||||
" sys.exit('Please upgrade the Notebook dependency before you can proceed, you can do it by running the \"Reinstall Notebook dependencies\" command in command palette (View menu -> Command Palette…).')\n",
|
||||
"def run_command(command):\n",
|
||||
" print(\"Executing: \" + command)\n",
|
||||
" !{command}\n",
|
||||
" if _exit_code != 0:\n",
|
||||
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\n",
|
||||
" print(f'Successfully executed: {command}')\n",
|
||||
"\n",
|
||||
"run_command('kubectl version --client=true')\n",
|
||||
"run_command('azdata --version')"
|
||||
],
|
||||
"metadata": {
|
||||
@@ -256,7 +256,7 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### **Connect to SQL Server Master instance in Azure Data Studio**\r\n",
|
||||
"### **Connect to SQL Server Master instance in Azure Data Studio**\n",
|
||||
"Click the link below to connect to the SQL Server Master instance of the SQL Server 2019 Big Data Cluster."
|
||||
],
|
||||
"metadata": {
|
||||
@@ -266,11 +266,11 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\r\n",
|
||||
"if sqlEndpoints and len(sqlEndpoints) == 1:\r\n",
|
||||
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\r\n",
|
||||
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\r\n",
|
||||
"else:\r\n",
|
||||
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\n",
|
||||
"if sqlEndpoints and len(sqlEndpoints) == 1:\n",
|
||||
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\n",
|
||||
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\n",
|
||||
"else:\n",
|
||||
" sys.exit('Could not find the SQL Server Master instance endpoint')"
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
@@ -65,21 +65,21 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"import pandas,sys,os,json,html,getpass,time\r\n",
|
||||
"pandas_version = pandas.__version__.split('.')\r\n",
|
||||
"pandas_major = int(pandas_version[0])\r\n",
|
||||
"pandas_minor = int(pandas_version[1])\r\n",
|
||||
"pandas_patch = int(pandas_version[2])\r\n",
|
||||
"if not (pandas_major > 0 or (pandas_major == 0 and pandas_minor > 24) or (pandas_major == 0 and pandas_minor == 24 and pandas_patch >= 2)):\r\n",
|
||||
" sys.exit('Please upgrade the Notebook dependency before you can proceed, you can do it by running the \"Reinstall Notebook dependencies\" command in command palette (View menu -> Command Palette…).')\r\n",
|
||||
"def run_command(command):\r\n",
|
||||
" print(\"Executing: \" + command)\r\n",
|
||||
" !{command}\r\n",
|
||||
" if _exit_code != 0:\r\n",
|
||||
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\r\n",
|
||||
" print(f'Successfully executed: {command}')\r\n",
|
||||
"\r\n",
|
||||
"run_command('kubectl version --client=true')\r\n",
|
||||
"import pandas,sys,os,json,html,getpass,time\n",
|
||||
"pandas_version = pandas.__version__.split('.')\n",
|
||||
"pandas_major = int(pandas_version[0])\n",
|
||||
"pandas_minor = int(pandas_version[1])\n",
|
||||
"pandas_patch = int(pandas_version[2])\n",
|
||||
"if not (pandas_major > 0 or (pandas_major == 0 and pandas_minor > 24) or (pandas_major == 0 and pandas_minor == 24 and pandas_patch >= 2)):\n",
|
||||
" sys.exit('Please upgrade the Notebook dependency before you can proceed, you can do it by running the \"Reinstall Notebook dependencies\" command in command palette (View menu -> Command Palette…).')\n",
|
||||
"def run_command(command):\n",
|
||||
" print(\"Executing: \" + command)\n",
|
||||
" !{command}\n",
|
||||
" if _exit_code != 0:\n",
|
||||
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\n",
|
||||
" print(f'Successfully executed: {command}')\n",
|
||||
"\n",
|
||||
"run_command('kubectl version --client=true')\n",
|
||||
"run_command('azdata --version')"
|
||||
],
|
||||
"metadata": {
|
||||
@@ -256,7 +256,7 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### **Connect to SQL Server Master instance in Azure Data Studio**\r\n",
|
||||
"### **Connect to SQL Server Master instance in Azure Data Studio**\n",
|
||||
"Click the link below to connect to the SQL Server Master instance of the SQL Server 2019 Big Data Cluster."
|
||||
],
|
||||
"metadata": {
|
||||
@@ -266,11 +266,11 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\r\n",
|
||||
"if sqlEndpoints and len(sqlEndpoints) == 1:\r\n",
|
||||
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\r\n",
|
||||
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\r\n",
|
||||
"else:\r\n",
|
||||
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\n",
|
||||
"if sqlEndpoints and len(sqlEndpoints) == 1:\n",
|
||||
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\n",
|
||||
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\n",
|
||||
"else:\n",
|
||||
" sys.exit('Could not find the SQL Server Master instance endpoint')"
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user