The tutorial covers the following scenarios for connecting to SparkSQL:
1. Connectivity to SparkSQL 2.x via Strategy 10.9
2. DSN-less Connectivity to Spark Thrift server with Strategy Secure Enterprise 10.7 in Linux
3. DSN Connectivity to Spark Thrift Server with Strategy Secure Enterprise 10.7 in Linux
4. Kerberized DSN Connectivity to Spark SQL Thrift Server with Strategy Secure Enterprise in Windows
The release of Strategy 10.9 provides connectivity to SparkSQL 2.x!
The following demonstrates a DSN connection to SparkSQL 2.x in Strategy Developer in Windows:
To see a demo of a DSN connection through Linux, click here.
Connectivity was also demonstrated through a DSN-less connection through Strategy Desktop on Windows and on Mac, respectively:
You can also establish a a DSN-less connection through Strategy Web. To see a demo, click here.
When connecting to Spark SQL Thrift Server we will need the following information:
If Spark SQL thrift server is kerberized, we will also need the Service Principal Name of the spark thrift server. This will be something like: hive/ip-10-0-0-187.ec2.internal@POCAR.MICROSTRATEGY.COM.
Steps:
Troubleshoot:
If we see error "Unable to dynamically load the client DLL libgssapi_krb5.so" it is likely the GSSClient library is not found. To solve this problem:
When connecting to Spark SQL Thrift Server we will need the following information:
- Spark Thrift Server host: Host where the Spark Thrift Server is running on.
- Spark Thrift Server port: port used by spark thrift server, default is 10015.
- Database: Database in Hive metastore we want to access.
If Spark SQL thrift server is kerberized, we will also need the Service Principal Name of the spark thrift server. This will be something like: hive/ip-10-0-0-187.ec2.internal@POCAR.MICROSTRATEGY.COM.
Steps:
Custom group that displays Top 10 Customers and Bottom 5 Items [MySparkDSN] Driver=/var/opt/MicroStrategy/install/lib/MYsparkXX.so Description=MicroStrategy ODBC Driver for Apache Spark SQL ApplicationUsingThreads=1 ArraySize=16384 AuthenticationMethod=0 CryptoProtocolVersion= CryptoLibName= Database=default DefaultLongDataBuffLen=1024 EnableDescribeParam=1 EncryptionMethod= GSSClient=/lib64/libgssapi_krb5.so.2.2 HostName= HostNameInCertificate= IANAAppCodePage= KeepAlive=0 KeyPassword= Keystore= KeystorePassword= LoginTimeout=15 LogonID= MaxStringSize=4000 MinLongVarcharSize= PortNumber=10000 PRNGSeedFile= PRNGSeedSource= ProxyUser= RemoveColumnQualifiers=0 ServicePrincipalName= SSLLibName= MySparkDSN=MicroStrategy ODBC Driver for Apache Spark SQL
<PROPERTYSET NAME="System SQL Templates">
<PROPERTY NAME="CatalogTableSQL" VALUE="SHOW TABLES" />
<PROPERTY NAME="CatalogColumnSQL" VALUE="DESCRIBE #TABLE_LIST#" />
<PROPERTY NAME="TempTableDropSQL" VALUE="DROP TABLE #T#"/>
<PROPERTY NAME="CatalogCacheMode" VALUE="3" />
<PROPERTY NAME="CatalogRetrievalMode" VALUE="0" />
<PROPERTY NAME="SupportsKerberos" VALUE="1"/>
</PROPERTYSET>
<PROPERTYSET NAME="System SQL Templates">
<PROPERTY NAME="CatalogCacheMode" VALUE="3" />
<PROPERTY NAME="CatalogRetrievalMode" VALUE="2" />
</PROPERTYSET> |
Custom group that displays Top 10 Customers and Bottom 5 Items [MySparkDSN] Driver=/var/opt/MicroStrategy/install/lib/MYsparkXX.so Description=MicroStrategy ODBC Driver for Apache Spark SQL ApplicationUsingThreads=1 ArraySize=16384 AuthenticationMethod=0 CryptoProtocolVersion= CryptoLibName= Database=default DefaultLongDataBuffLen=1024 EnableDescribeParam=1 EncryptionMethod= GSSClient=/lib64/libgssapi_krb5.so.2.2 HostName= HostNameInCertificate= IANAAppCodePage= KeepAlive=0 KeyPassword= Keystore= KeystorePassword= LoginTimeout=15 LogonID= MaxStringSize=4000 MinLongVarcharSize= PortNumber=10000 PRNGSeedFile= PRNGSeedSource= ProxyUser= RemoveColumnQualifiers=0 ServicePrincipalName= SSLLibName= MySparkDSN=MicroStrategy ODBC Driver for Apache Spark SQL
<PROPERTYSET NAME="System SQL Templates">
<PROPERTY NAME="CatalogTableSQL" VALUE="SHOW TABLES" />
<PROPERTY NAME="CatalogColumnSQL" VALUE="DESCRIBE #TABLE_LIST#" />
<PROPERTY NAME="TempTableDropSQL" VALUE="DROP TABLE #T#"/>
<PROPERTY NAME="CatalogCacheMode" VALUE="3" />
<PROPERTY NAME="CatalogRetrievalMode" VALUE="0" />
<PROPERTY NAME="SupportsKerberos" VALUE="1"/>
</PROPERTYSET>
<PROPERTYSET NAME="System SQL Templates">
<PROPERTY NAME="CatalogCacheMode" VALUE="3" />
<PROPERTY NAME="CatalogRetrievalMode" VALUE="2" />
</PROPERTYSET> |
Custom group that displays Top 10 Customers and Bottom 5 Items [MySparkDSN] Driver=/var/opt/MicroStrategy/install/lib/MYsparkXX.so Description=MicroStrategy ODBC Driver for Apache Spark SQL ApplicationUsingThreads=1 ArraySize=16384 AuthenticationMethod=0 CryptoProtocolVersion= CryptoLibName= Database=default DefaultLongDataBuffLen=1024 EnableDescribeParam=1 EncryptionMethod= GSSClient=/lib64/libgssapi_krb5.so.2.2 HostName= HostNameInCertificate= IANAAppCodePage= KeepAlive=0 KeyPassword= Keystore= KeystorePassword= LoginTimeout=15 LogonID= MaxStringSize=4000 MinLongVarcharSize= PortNumber=10000 PRNGSeedFile= PRNGSeedSource= ProxyUser= RemoveColumnQualifiers=0 ServicePrincipalName= SSLLibName= MySparkDSN=MicroStrategy ODBC Driver for Apache Spark SQL
<PROPERTYSET NAME="System SQL Templates">
<PROPERTY NAME="CatalogTableSQL" VALUE="SHOW TABLES" />
<PROPERTY NAME="CatalogColumnSQL" VALUE="DESCRIBE #TABLE_LIST#" />
<PROPERTY NAME="TempTableDropSQL" VALUE="DROP TABLE #T#"/>
<PROPERTY NAME="CatalogCacheMode" VALUE="3" />
<PROPERTY NAME="CatalogRetrievalMode" VALUE="0" />
<PROPERTY NAME="SupportsKerberos" VALUE="1"/>
</PROPERTYSET>
<PROPERTYSET NAME="System SQL Templates">
<PROPERTY NAME="CatalogCacheMode" VALUE="3" />
<PROPERTY NAME="CatalogRetrievalMode" VALUE="2" />
</PROPERTYSET> |
Custom group that displays Top 10 Customers and Bottom 5 Items [MySparkDSN] Driver=/var/opt/MicroStrategy/install/lib/MYsparkXX.so Description=MicroStrategy ODBC Driver for Apache Spark SQL ApplicationUsingThreads=1 ArraySize=16384 AuthenticationMethod=0 CryptoProtocolVersion= CryptoLibName= Database=default DefaultLongDataBuffLen=1024 EnableDescribeParam=1 EncryptionMethod= GSSClient=/lib64/libgssapi_krb5.so.2.2 HostName= HostNameInCertificate= IANAAppCodePage= KeepAlive=0 KeyPassword= Keystore= KeystorePassword= LoginTimeout=15 LogonID= MaxStringSize=4000 MinLongVarcharSize= PortNumber=10000 PRNGSeedFile= PRNGSeedSource= ProxyUser= RemoveColumnQualifiers=0 ServicePrincipalName= SSLLibName= MySparkDSN=MicroStrategy ODBC Driver for Apache Spark SQL
<PROPERTYSET NAME="System SQL Templates">
<PROPERTY NAME="CatalogTableSQL" VALUE="SHOW TABLES" />
<PROPERTY NAME="CatalogColumnSQL" VALUE="DESCRIBE #TABLE_LIST#" />
<PROPERTY NAME="TempTableDropSQL" VALUE="DROP TABLE #T#"/>
<PROPERTY NAME="CatalogCacheMode" VALUE="3" />
<PROPERTY NAME="CatalogRetrievalMode" VALUE="0" />
<PROPERTY NAME="SupportsKerberos" VALUE="1"/>
</PROPERTYSET>
<PROPERTYSET NAME="System SQL Templates">
<PROPERTY NAME="CatalogCacheMode" VALUE="3" />
<PROPERTY NAME="CatalogRetrievalMode" VALUE="2" />
</PROPERTYSET> |
When connecting to Spark SQL Thrift Server we will need the following information:
If Spark SQL thrift server utilizes Kerberos (is kerberized), we will also need the Service Principal Name of the spark thrift server. An example of a service principal name is as follows:
hive/ip-10-0-0-187.ec2.internal@POCAR.MICROSTRATEGY.COM.






