You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/features/sql-big-data-cluster/spark/data-virtualization/mssql_spark_connector_ad_pyspark.ipynb
+116-5Lines changed: 116 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -53,15 +53,15 @@
53
53
"The following section shows how to generate principal and keytab. This assumes you have a SS19 Big Data Cluster installed with Windows AD contoller for domain AZDATA.LOCAL. One of the users is [email protected] and the user is part of Domain Admin group.\r\n",
54
54
"\r\n",
55
55
"## Create KeyTab file using ktpass\r\n",
56
-
"1. Login to the Windows AD controller with user1 credentials.\r\n",
56
+
"1. Login to the Windows AD controller with testusera1 credentials.\r\n",
57
57
"2. Open command prompt in Administrator mode.\r\n",
58
58
"3. Use ktpass to create a key tab. Refer [here](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ktpass) for documentation on using ktpass. \r\n",
"The command above should generate a keytab file named testusera1.keytab. Transfer this file to hdfs folder in Big Data Cluster. In this sample we transfer the file to /user/testusera1/testusera1.keytab\r\n",
64
+
"Note that principal name in ktpass is case sensitive. The command above generates a keytab file named testusera1.keytab. Transfer this file to hdfs folder in Big Data Cluster. In this sample we transfer the file to /user/testusera1/testusera1.keytab\r\n",
"grant alter any external data source to [aris\\testuser];\r\n",
129
+
"\r\n",
130
+
"-- To create external table\r\n",
131
+
"grant create table to [aris\\testuser];\r\n",
132
+
"grant alter any schema to [aris\\testuser];\r\n",
133
+
"\r\n",
134
+
"ALTER ROLE [db_datareader] ADD MEMBER [aris\\testuser]\r\n",
135
+
"ALTER ROLE [db_datawriter] ADD MEMBER [aris\\testuser]\r\n",
136
+
"```\r\n",
137
+
"\r\n",
138
+
"```\r\n",
139
+
"CREATE EXTERNAL DATA SOURCE connector_ds WITH (LOCATION = 'sqldatapool://controller-svc/default');\r\n",
140
+
"EXECUTE('USE spark_mssql_db; CREATE EXTERNAL TABLE [dummy3] ([number] int, [word] nvarchar(2048)) WITH (DATA_SOURCE = connector_ds, DISTRIBUTION = ROUND_ROBIN)')\r\n",
141
+
"\r\n",
142
+
"-- Create a login in data pools and Provide right permissions to this user\r\n",
143
+
"EXECUTE( ' Use spark_mssql_db; CREATE LOGIN [aris\\testusera1] FROM WINDOWS ' ) AT DATA_SOURCE connector_ds;\r\n",
144
+
"\r\n",
145
+
"EXECUTE( ' Use spark_mssql_db; CREATE USER [aris\\testusera1] ; ALTER ROLE [db_datareader] ADD MEMBER [aris\\testusera1]; ALTER ROLE [db_datawriter] ADD MEMBER [aris\\testusera1] ;') AT DATA_SOURCE connector_ds;\r\n",
0 commit comments