### Install SWAT from PyPI Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/install.md Use this command to install the latest release of the SWAT package from the Python Package Index (PyPI). ```bash pip install swat ``` -------------------------------- ### Install SWAT from GitHub Archive (REST Interface Only) Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/install.md Install SWAT from a GitHub source code archive, which supports only the CAS REST interface. Replace X.X.X with the desired release version. ```bash pip install https://github.com/sassoftware/python-swat/archive/vX.X.X.tar.gz ``` -------------------------------- ### Install SWAT from GitHub Release (Binary Protocol) Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/install.md Install a specific release of SWAT from GitHub, suitable for platforms requiring the binary protocol. Replace X.X.X and platform with your specific version and target system. ```bash pip install https://github.com/sassoftware/python-swat/releases/download/vX.X.X/python-swat-X.X.X-platform.tar.gz ``` -------------------------------- ### Example Authinfo Entry Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md An example entry for an authinfo file, specifying the host, port, username, and password for a CAS connection. Ensure file permissions are set to 0600 for security. ```default host cas.my-company.com port 12354 user user01 password !s3cret ``` -------------------------------- ### Example Git Commit Sign-off Source: https://github.com/sassoftware/python-swat/blob/main/ContributorAgreement.txt An example of a correctly formatted sign-off line for a Git commit message. ```git Signed-off-by: Random J. Developer ``` -------------------------------- ### Connect to CAS using a URL with Proxy Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md This example shows how to connect to CAS using a URL when a proxy server is involved, requiring a base path. Username and password must be specified as keyword arguments. ```python import swat s = swat.CAS(url='http://dssgwnlt.unx.sas.com:8777/casmanagement', path='/cas-shared-default-http', username='casadmin', password='password') ``` -------------------------------- ### Example AI Contribution Disclosure (Assisted) Source: https://github.com/sassoftware/python-swat/blob/main/ContributorAgreement.txt An example of the 'Assisted-by' line for a commit message where an AI tool assisted in the contribution. ```git Assisted-by: GitHub Copilot ``` -------------------------------- ### Example AI Contribution Disclosure (Entirely Generated) Source: https://github.com/sassoftware/python-swat/blob/main/ContributorAgreement.txt An example of the 'Generated-by' line for a commit message where the contribution was entirely created by an AI. ```git Generated-by: Claude Code ``` -------------------------------- ### Read CSV and Get Table Head Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/workflows.md Reads a CSV file into a CAS table and displays the first few rows using pandas-DataFrame methods. This demonstrates the basic workflow of loading data and interacting with it as a CASTable object. ```python from swat import CAS # Connect to CAS conn = CAS(host='cas.example.com', port=5570, username='user', password='password') # Read a CSV file into a CAS table # The 'table' parameter is automatically populated with the CASTable object # The 'head()' method is a pandas.DataFrame method applied to the CASTable object table = conn.read_csv('mydata.csv') # Display the first 5 rows of the CAS table print(table.head()) # Close the connection conn.terminate() ``` -------------------------------- ### Set CASSPN environment variable for Kerberos Source: https://github.com/sassoftware/python-swat/blob/main/README.md For SAS Viya 3.5 CAS servers using Kerberos with python-swat v1.8.0+, set the CASSPN environment variable before connecting. The SPN must start with 'sascas@' followed by the hostname. ```bash export CASSPN=sascas@host ``` -------------------------------- ### Resolve Unable to Import _pyXXswat Error Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/troubleshooting.md If you receive a 'ValueError: Could not import import _pyXXswat.' when creating a CAS connection, it typically indicates missing SAS TK libraries or an improperly installed Python extension. Ensure you are using the installer that bundles SAS TK libraries or, if using a source-only installation, connect to the REST interface of CAS instead of a binary port. ```python In [1]: conn = swat.CAS(hostname, port) . . . During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) in () ----> 1 swat.CAS('my-cas', 12345) connection.py in __init__(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, **kwargs) 223 self._sw_error = rest.REST_CASError(a2n(soptions)) 224 else: --> 225 self._sw_error = clib.SW_CASError(a2n(soptions)) 226 except SystemError: 227 raise SWATError('Could not create CAS object. Check your TK path setting.') clib.py in SW_CASError(*args, **kwargs) 84 ''' Return a CASError (importing _pyswat as needed) ''' 85 if _pyswat is None: ---> 86 _import_pyswat() 87 return _pyswat.SW_CASError(*args, **kwargs) 88 clib.py in _import_pyswat() 43 raise ValueError(('Could not import import %s. This is likely due to an ' 44 'incorrect SAS TK path or an error while loading the SAS TK subsystem. ' ---> 45 'You can try using the REST interface as an alternative.') % libname) 46 47 ValueError: Could not import import _py34swat. This is likely due to an incorrect SAS TK path or an error while loading the SAS TK subsystem. You can try using the REST interface as an alternative. ``` -------------------------------- ### Python SWAT Missing Linux Library Dependency Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/troubleshooting.md This error indicates that a required shared library for SWAT is missing on the Linux system. It often appears during CAS connection attempts. Installing the missing package or setting LD_LIBRARY_PATH can resolve this. ```python In [1]: conn = swat.CAS(hostname, port) tkBoot failed: Cannot dlopen [tkmk.so] : [libnuma.so.1: cannot open shared object file: No such file or directory] ``` -------------------------------- ### Running Individual SWAT Test with Profiling Source: https://github.com/sassoftware/python-swat/blob/main/CONTRIBUTING.md Run a specific test file, such as test_basics.py, and enable profiling to analyze its performance. This is useful for debugging and optimization. ```bash python swat/tests/cas/test_basics.py --profile ``` -------------------------------- ### Connect to CAS Server and Execute Server Status Action Source: https://github.com/sassoftware/python-swat/blob/main/README.md Import the swat library, establish a connection to the CAS server, execute the serverstatus action, print the output, and close the connection. The default port is 5570. ```python >>> import swat >>> conn = swat.CAS(host, port, username, password) >>> out = conn.serverstatus() NOTE: Grid node action status report: 1 nodes, 6 total actions executed. >>> print(out) [About] {'CAS': 'Cloud Analytic Services', 'Copyright': 'Copyright © 2014-2016 SAS Institute Inc. All Rights Reserved.', 'System': {'Hostname': 'cas01', 'Model Number': 'x86_64', 'OS Family': 'LIN X64', 'OS Name': 'Linux', 'OS Release': '2.6.32-504.12.2.el6.x86_64', 'OS Version': '#1 SMP Sun Feb 1 12:14:02 EST 2015'}, 'Version': '3.01', 'VersionLong': 'V.03.01M0D08232016', 'license': {'expires': '20Oct2016:00:00:00', 'gracePeriod': 62, 'site': 'SAS Institute Inc.', 'siteNum': 1, 'warningPeriod': 31}} [server] Server Status nodes actions 0 1 6 [nodestatus] Node Status name role uptime running stalled 0 cas01 controller 4.836 0 0 + Elapsed: 0.0168s, user: 0.016s, sys: 0.001s, mem: 0.287mb >>> conn.close() ``` -------------------------------- ### Run Server Status Action Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Test your CAS connection by running the 'serverstatus' action. This action returns information about the CAS server. ```python s.serverstatus() ``` -------------------------------- ### Running SWAT Tests with nosetests Source: https://github.com/sassoftware/python-swat/blob/main/CONTRIBUTING.md Execute the entire SWAT test suite using the nosetests command. Ensure your environment variables are set for CAS connection. ```bash nosetests -v swat.tests ``` -------------------------------- ### Connect to CAS using Hostname and Port Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Use this method to establish a connection to a CAS server by providing the hostname, port, username, and password. ```python import swat s = swat.CAS('dssgwnlt.unx.sas.com', 8777, 'casadmin', 'password') ``` -------------------------------- ### Setting File Permissions Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Command to set the necessary file permissions for the authinfo file, ensuring it is only readable and writable by the owner. This is crucial for security. ```default chmod 0600 ~/.authinfo ``` -------------------------------- ### Call CAS Action with Response Callback Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/workflows.md Demonstrates calling a CAS action ('summary') and processing its entire response using a response callback function. The callback function receives the response, connection, and user data. ```python from swat import CAS def my_response_callback(response, connection, userdata): print(f"Response Keys: {list(response.keys())}") print(f"Userdata: {userdata}") # Return updated userdata for the next call return userdata + 1 # Connect to CAS conn = CAS(host='cas.example.com', port=5570, username='user', password='password') # Load the 'simple' action set conn.loadactionset('simple') # Call the 'summary' action with a response callback # The initial userdata is 0 results = conn.simple.summary(table='mydata', responsefunc=my_response_callback, userdata=0) # Close the connection conn.terminate() ``` -------------------------------- ### Basic .casrc Configuration Source: https://github.com/sassoftware/python-swat/blob/main/CONTRIBUTING.md This is the most basic form of a .casrc configuration file. It specifies the CAS host, port, and protocol. ```lua cashost = 'myhost.com' casport = 5570 casprotocol = 'cas' ``` -------------------------------- ### OAuth Token with PKCE Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Enables Proof Key for Code Exchange (PKCE) for obtaining OAuth tokens via authentication codes, enhancing security for HTTP connections. Requires Python 3.6+. Set pkce=True in the CAS constructor. ```python from swat import CAS # Authenticate using PKCE for OAuth token generation c = CAS(hostname='cas.my-company.com', pkce=True) # Alternatively, use the environment variable CAS_PKCE or VIYA_PKCE # c = CAS(hostname='cas.my-company.com', pkce=True) ``` -------------------------------- ### Call CAS Action with Response Callback Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/workflows.md Demonstrates calling a CAS action ('summary') and processing its response using a result callback function. The callback function receives the result key, value, response, connection, and user data. ```python from swat import CAS def my_result_callback(key, value, response, connection, userdata): print(f"Result Key: {key}") print(f"Result Value: {value}") print(f"Userdata: {userdata}") # Return updated userdata for the next call return userdata + 1 # Connect to CAS conn = CAS(host='cas.example.com', port=5570, username='user', password='password') # Load the 'simple' action set conn.loadactionset('simple') # Call the 'summary' action with a result callback # The initial userdata is 0 results = conn.simple.summary(table='mydata', resultfunc=my_result_callback, userdata=0) # Close the connection conn.terminate() ``` -------------------------------- ### Authinfo File Format Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Defines the structure for storing host, user, password, and port information in an authinfo file. This method is recommended for managing credentials securely. ```default host HOST user USERNAME password PASSWORD port PORT ``` -------------------------------- ### CAS Action Call with Mixed Case Parameters Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/gotchas.md Demonstrates how mixed-case parameter keys in a CAS action call can lead to errors due to duplicate key interpretation by CAS. The SWAT client typically lower-cases parameter names to avoid this. ```python conn.summary(subset=['Max', 'Min'] subSet=['N']) ``` -------------------------------- ### OAuth Token Authentication Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Demonstrates how to authenticate to the CAS server using an OAuth token. The token can be provided directly in the CAS constructor via the 'password' parameter, or through environment variables. ```python from swat import CAS # Authenticate using OAuth token via password parameter c = CAS(hostname='cas.my-company.com', password='YOUR_OAUTH_TOKEN') # Authenticate using OAuth token via environment variable (CAS_TOKEN or CAS_PASSWORD) # Ensure the environment variable is set before running the script # c = CAS(hostname='cas.my-company.com') ``` -------------------------------- ### Kerberos Authentication Configuration Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Explains how to configure Kerberos authentication for Viya 4 CAS servers. For Viya 3.5 compatibility with SWAT releases 1.8.0+, use the CASSPN environment variable to specify the Viya 3.5 service principal name. ```bash # For Viya 3.5 CAS servers with SWAT 1.8.0+ export CASSPN="sascas@your_viya3.5_hostname.com" ``` -------------------------------- ### Connect to CAS using a URL Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Connect to a CAS server using a URL, which is useful for REST connections. Username and password must be specified as keyword arguments. ```python import swat s = swat.CAS(url='http://dssgwnlt.unx.sas.com:8777/casmanagement', username='casadmin', password='password') ``` -------------------------------- ### Fix Incorrect SAS TK Configuration Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/troubleshooting.md If you encounter a 'tkBoot failed' or 'Could not create CAS object. Check your TK path setting.' error, ensure that `swat.options.tkpath` is correctly set to the location of the SAS TK libraries. ```python In [1]: conn = swat.CAS(hostname, port) tkBoot failed: Cannot Locate [tkmk] in [/usr/local/lib/swat-tk:/opt/sas/viya/SASFoundation/sasexe/: Could not get TK handle --------------------------------------------------------------------------- . . . SWATError Traceback (most recent call last) in () ----> 1 s = swat.CAS('my-cas', 12345) connection.py in __init__(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, **kwargs) 225 self._sw_error = clib.SW_CASError(a2n(soptions)) 226 except SystemError: --> 227 raise SWATError('Could not create CAS object. Check your TK path setting.') 228 229 # Make the connection SWATError: Could not create CAS object. Check your TK path setting. ``` -------------------------------- ### Troubleshooting: Unable to Locate libssl Error Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/encryption.md Indicates that the client cannot find the libssl shared library on the system, often seen on Ubuntu Linux. This requires specifying the path to the libssl file. ```text ERROR: The TCP/IP negClientSSL support routine failed with status 803fd068 ``` -------------------------------- ### Set CAS Client SSL CA List Environment Variable Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/encryption.md Configure the path to the SSL certificate bundle on the client side for Linux, Mac, and REST protocol on Windows. This variable must be set in the environment where the Python client is running. ```shell CAS_CLIENT_SSL_CA_LIST='/path/to/certificates.pem' ``` -------------------------------- ### Python SWAT Authentication Error: Incorrect Permissions Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/troubleshooting.md This snippet illustrates an authentication error due to incorrect file permissions on the Authinfo file. The file must be readable only by the owner. ```python In [1]: conn = swat.CAS('my-cas', 12345) WARNING: Incorrect permissions on netrc/authinfo file. ERROR: Kerberos initialization failed. Your credential cache is either expired or missing. --------------------------------------------------------------------------- SystemError Traceback (most recent call last) connection.py in__init__(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, **kwargs) 256 a2n(soptions), --> 257 self._sw_error) 258 if self._sw_connection is None: . . SWATError: Could not connect to 'my-cas' on port 12345. ``` -------------------------------- ### Create Custom Data Loader with CASDataMsgHandler Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/loading-data.md Implement a custom data loader by subclassing CASDataMsgHandler. This allows uploading data from any Python-readable stream or file. Requires defining 'vars' and implementing 'getrow()'. ```python from swat.cas.datamsghandlers import CASDataMsgHandler class MyDataMsgHandler(CASDataMsgHandler): def __init__(self, data, **kwargs): super().__init__(**kwargs) self.data = data self.row_index = 0 self.vars = { "col1": "char", "col2": "int", "col3": "double" } def getrow(self): if self.row_index >= len(self.data): return None row = self.data[self.row_index] self.row_index += 1 return row # Example usage: data = [ ["a", 1, 1.1], ["b", 2, 2.2], ["c", 3, 3.3] ] my_dmh = MyDataMsgHandler(data) sess.addtable(my_dmh, casout={'name': 'custom_data'}) ``` -------------------------------- ### Upload and Parse File using CAS.upload_file() Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/loading-data.md Upload a data file to CAS and parse it on the server. This method is generally faster for larger datasets than client-side parsing. ```python from swat import CAS c = CAS(host='cas-shared-default-cascontroller.cas.svc', port=8765) # Upload and parse a file from a URL sess.upload_file('https://raw.githubusercontent.com/sassoftware/python-swat/main/samples/data/cars.csv', casout={'name': 'cars_uploaded'}) # Upload and parse a local file # sess.upload_file('cars.csv', casout={'name': 'cars_uploaded'}) ``` -------------------------------- ### OAuth Token via Authentication Code Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Shows how to obtain an OAuth token using an authentication code when using the HTTP protocol. The 'authcode' parameter in the CAS constructor is used for this purpose. ```python from swat import CAS # Authenticate using an authentication code c = CAS(hostname='cas.my-company.com', authcode='YOUR_AUTH_CODE') # Alternatively, use the environment variable CAS_AUTHCODE or VIYA_AUTHCODE # c = CAS(hostname='cas.my-company.com') ``` -------------------------------- ### Converting CASTable to DataFrame Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/table-vs-dataframe.md Demonstrates how to convert a CASTable object to a pandas DataFrame. Be cautious as this method attempts to pull all data locally, regardless of size. ```python tbl.to_frame() # Warning: This will attempt to pull all data down regardless of size. ``` -------------------------------- ### Troubleshooting: No Certificate Used Error Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/encryption.md Displays the error message when attempting to connect to an SSL-enabled CAS server without a configured client certificate. This typically indicates that the CAS_CLIENT_SSL_CA_LIST environment variable is not set correctly. ```text ERROR: The TCP/IP negClientSSL support routine failed with status 807ff013. ``` -------------------------------- ### CASTable Method Return Types Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/table-vs-dataframe.md Illustrates the return types for common methods when operating on CASTable objects compared to pandas DataFrames. Note that CAS actions like summary() return CASResults. ```python o.head() # Returns: DataFrame o.describe() # Returns: DataFrame o['col'] # Returns: CASColumn o[['col']] # Returns: CASTable o.summary() # Returns: CASResults ``` -------------------------------- ### Invoke Multiple CAS Actions Simultaneously Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/workflows.md Invokes multiple CAS actions ('summary') on different tables across two connections concurrently. Responses are retrieved iteratively using getnext(), allowing for parallel processing. ```python from swat import CAS # Connect to two CAS instances conn1 = CAS(host='cas1.example.com', port=5570, username='user', password='password') conn2 = CAS(host='cas2.example.com', port=5570, username='user', password='password') # Load the 'simple' action set on both connections conn1.loadactionset('simple') conn2.loadactionset('simple') # Invoke the 'summary' action on different tables from both connections # Note: The 'table' parameter is specified for each action results1 = conn1.simple.summary(table='table1', invoke=True) results2 = conn2.simple.summary(table='table2', invoke=True) # Iterate over the connection objects to retrieve responses as they become available # This allows for handling responses from multiple actions concurrently for result in conn1.getnext(): print(result) for result in conn2.getnext(): print(result) # Close the connections conn1.terminate() conn2.terminate() ``` -------------------------------- ### Set TKESSL_OPENSSL_LIB Environment Variable Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/encryption.md Specify the path to the libssl shared library on the client side when it cannot be located automatically. This is a common solution for 'Unable to Locate libssl' errors on Linux systems. ```shell TKESSL_OPENSSL_LIB=/path/to/libs/libssl.so.1.0.0 ``` -------------------------------- ### Uploading DataFrame to CAS Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/table-vs-dataframe.md Shows how to upload a pandas DataFrame to a CAS table. This is a way to make local DataFrame data available on the CAS server. ```python cas.upload(df=my_dataframe, casout=my_cas_table) ``` -------------------------------- ### Load CSV Data using CAS.read_csv() Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/loading-data.md Load data from a CSV file or URL into a CAS table using a method similar to pandas.read_csv(). This is suitable for smaller datasets. ```python from swat import CAS c = CAS(host='cas-shared-default-cascontroller.cas.svc', port=8765) # Load data from a URL sess.read_csv('https://raw.githubusercontent.com/sassoftware/python-swat/main/samples/data/cars.csv') # Load data from a local file # sess.read_csv('cars.csv') ``` -------------------------------- ### Access CAS Action Results by Key Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Access the results of a CAS action using standard dictionary key access. The keys are displayed in square brackets in the output. ```python results = s.serverstatus() print(results['About']) print(results['server']) print(results['nodestatus']) ``` -------------------------------- ### CASColumn vs. Series Method Return Types Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/table-vs-dataframe.md Shows the return types for common methods when operating on CASColumn objects compared to pandas Series. CASColumn operates on a single column of data. ```python c.head() # Returns: Series c[c.col > 1] # Returns: CASColumn ``` -------------------------------- ### Python SWAT Authentication Error: Incorrect Password Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/troubleshooting.md This snippet shows an authentication error resulting from an incorrect password in the Authinfo file or a mismatch between the hostname/port in the file and the CAS constructor. ```python In [1]: conn = swat.CAS('my-cas', 12345) ERROR: Connection failed. Server returned: Authentication failed: Access denied. --------------------------------------------------------------------------- SystemError Traceback (most recent call last) connection.py in __init__(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, **kwargs) 256 a2n(soptions), --> 257 self._sw_error) 258 if self._sw_connection is None: . . SWATError: Could not connect to 'my-cas' on port 12345. ``` -------------------------------- ### Sign-off for Git Commit Messages Source: https://github.com/sassoftware/python-swat/blob/main/ContributorAgreement.txt Include this line in your commit message to attest to your right to contribute. Use your real name. ```git Signed-off-by: Firstname Lastname ``` -------------------------------- ### Python SWAT Refused Connection Error Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/troubleshooting.md This snippet shows the error message and traceback when a connection to the CAS server is refused. This typically indicates the CAS server is not running or is inaccessible due to network issues. ```python In [1]: conn = swat.CAS('my-cas', 12345) ERROR: The TCP/IP tcpSockConnect support routine failed with error 61 (The connection was refused.). ERROR: Failed to connect to host 'my-cas', port 12345. . . During handling of the above exception, another exception occurred: SWATError Traceback (most recent call last) in () ----> 1 conn = swat.CAS('my-cas', 12345) cas/connection.py in __init__(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, **kwargs) 259 raise SystemError 260 except SystemError: --> 261 raise SWATError(self._sw_error.getLastErrorMessage()) 262 263 errorcheck(self._sw_connection.setZeroIndexedParameters(), self._sw_connection) SWATError: Could not connect to 'my-cas' on port 12345. ``` -------------------------------- ### Set LD_LIBRARY_PATH Environment Variable Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/encryption.md An alternative method to resolve 'Unable to Locate libssl' errors by setting the general library path environment variable. This helps the system find shared libraries, including libssl. ```shell LD_LIBRARY_PATH=/path/to/libs ``` -------------------------------- ### Update ALWAYS_INLINE Definition for Intel Compiler on Windows Source: https://github.com/sassoftware/python-swat/blob/main/swat/readme.md This change was made to the `pyport.h` file to resolve a compiler error when using the Intel compiler on Windows. It ensures correct handling of the `ALWAYS_INLINE` macro. ```c #elif defined(__GNUC__) || defined(__clang__) || defined(__INTEL_COMPILER) ``` ```c #elif defined(__GNUC__) || defined(__clang__) || defined(__INTEL_LLVM_COMPILER) || (defined(__INTEL_COMPILER) && !defined(_WIN32)) ``` -------------------------------- ### Troubleshooting: Incorrect Certificate Used Error Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/encryption.md Displays the error message when the client is using an incorrect SSL certificate for the CAS server. This suggests that the CAS_CLIENT_SSL_CA_LIST environment variable points to the wrong certificate file. ```text ERROR: The TCP/IP negClientSSL support routine failed with status 807ff008. ``` -------------------------------- ### Calling CAS Action with Capitalized Name Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/gotchas.md Shows how capitalizing the first letter of a CAS action name, like 'conn.Summary()', returns a CAS action object instead of executing the action. This enables building action parameters in an object-oriented manner. ```python conn.Summary() ``` -------------------------------- ### AI Contribution Disclosure (Assisted) Source: https://github.com/sassoftware/python-swat/blob/main/ContributorAgreement.txt Add this line to your commit message if an AI tool assisted in creating your contribution. Specify the assistant's name. ```git Assisted-by: Assistant Name ``` -------------------------------- ### Access CAS Action Results by Attribute Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/getting-started.md Access the results of a CAS action using attribute notation for convenience. Be aware of potential naming collisions with Python attributes. ```python results = s.serverstatus() print(results.About) print(results.server) print(results.nodestatus) ``` -------------------------------- ### AI Contribution Disclosure (Entirely Generated) Source: https://github.com/sassoftware/python-swat/blob/main/ContributorAgreement.txt Add this line to your commit message if an AI tool generated your entire contribution. Specify the assistant's name. ```git Generated-by: Assistant Name ``` -------------------------------- ### Accessing CAS Action with Explicit Namespace Source: https://github.com/sassoftware/python-swat/blob/main/doc/source/gotchas.md Demonstrates how to explicitly access a CAS action using its action set name to avoid attribute collisions on CASTable objects. This ensures you are calling the intended CAS action rather than a Python method or table parameter. ```python simple.groupby(name='mycas.iris', groupby='species') ```