{"id":7650,"library":"qds-sdk","title":"Qubole Data Service SDK (qds-sdk)","description":"The Qubole Data Service (QDS) Python SDK provides a programmatic interface for interacting with the Qubole Data Service API, allowing users to manage clusters, submit commands (e.g., Hive, Spark, Presto), and access query results. The library is actively maintained, with version 1.17.0 being the latest, and typically sees several releases per year to add features and ensure compatibility.","status":"active","version":"1.17.0","language":"en","source_language":"en","source_url":"https://github.com/qubole/qds-sdk-py","tags":["qubole","data-platform","cloud","api-client","big-data","etl"],"install":[{"cmd":"pip install qds-sdk==1.17.0","lang":"bash","label":"Install specific version"},{"cmd":"pip install qds-sdk","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Date and time utilities for API interactions.","package":"python-dateutil"},{"reason":"Used for string inflections (e.g., singular/plural forms in API object names).","package":"inflection"},{"reason":"HTTP client for making API requests to Qubole.","package":"requests"},{"reason":"Python 2 and 3 compatibility utilities, though Python 2.x support is largely dropped in recent versions.","package":"six"}],"imports":[{"symbol":"Qubole","correct":"import qds_sdk\nqds_sdk.set_api_token('YOUR_API_TOKEN')"},{"symbol":"HiveCommand","correct":"from qds_sdk.commands import HiveCommand"},{"symbol":"Cluster","correct":"from qds_sdk.clusters import Cluster"},{"symbol":"Command","correct":"from qds_sdk.commands import Command"}],"quickstart":{"code":"import os\nfrom qds_sdk.commands import HiveCommand\nfrom qds_sdk import qds\n\n# Configure Qubole API token and endpoint\nqds.set_api_token(os.environ.get('QDS_API_TOKEN', ''))\nqds.set_api_url(os.environ.get('QDS_API_URL', 'https://api.qubole.com/api/v1.2'))\n\n# Define and execute a Hive command\nhive_command = HiveCommand.create(\n    query='SELECT 1 + 1 AS result;',\n    cluster_id=os.environ.get('QDS_CLUSTER_ID', None) # Use an existing cluster ID or name\n)\n\nprint(f\"Submitted Hive Command ID: {hive_command.id}\")\n\n# Wait for command completion (optional, for synchronous execution)\nstatus = HiveCommand.wait_for_completion(hive_command.id)\nprint(f\"Command {hive_command.id} finished with status: {status}\")\n\n# Fetch results\nif status == 'done':\n    result = HiveCommand.get_results(hive_command.id)\n    print(\"Query Result:\")\n    print(result)","lang":"python","description":"This quickstart demonstrates how to configure the Qubole SDK with API credentials and submit a simple Hive command. It requires setting `QDS_API_TOKEN` and `QDS_API_URL` as environment variables, and optionally `QDS_CLUSTER_ID` for targeting a specific cluster. The example submits a query, waits for its completion, and then fetches the results."},"warnings":[{"fix":"Upgrade to Python 2.7+ or preferably Python 3.6+ for continued support and security updates. For Python 2.x users, explicitly install `qds-sdk<1.13.1` if upgrading Python is not an option.","message":"Support for Python 2.6 was dropped. Users on older Python 2.x versions might encounter compatibility issues or errors.","severity":"breaking","affected_versions":"<=1.13.1"},{"fix":"Ensure your AWS S3 buckets and configurations support Signature Version V4. If encountering S3 authentication issues, check your Qubole cluster S3 settings and potentially AWS IAM policies.","message":"The default S3 Signature Version for API requests changed to V4. This might affect interactions with older S3 buckets or specific S3 endpoints that only support V2 signatures.","severity":"breaking","affected_versions":">=1.12.0"},{"fix":"Upgrade to `qds-sdk==1.17.0` or newer when using Python 3.12 to ensure full compatibility and avoid unexpected behavior.","message":"Versions prior to 1.17.0 might have compatibility issues or syntax warnings when running on Python 3.12 due to deprecated constructs and third-party library changes.","severity":"gotcha","affected_versions":"<1.17.0"},{"fix":"Always refer to the latest QDS SDK documentation or `help()` for specific command/resource creation methods to understand required and optional parameters. Be mindful of new parameters that might become mandatory or change default behavior in future releases.","message":"API commands and resources frequently receive new parameters (e.g., `--upload-to-source` for JupyterNotebookCommand). While usually additions, incorrect usage or assumptions about default behavior can lead to errors.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Verify that `QDS_API_TOKEN` environment variable is set correctly and contains a valid, active Qubole API token. You can generate a new token from your Qubole account settings.","cause":"The Qubole API token is either missing, invalid, or expired, preventing authentication with the Qubole service.","error":"qds_sdk.exception.ApiException: HTTP 401 Unauthorized"},{"fix":"Consult the QDS SDK documentation or the Qubole API reference for the specific command or resource you are using to identify all required parameters. Ensure all mandatory arguments are passed to the SDK method.","cause":"A necessary parameter for creating or updating a Qubole resource (e.g., `cluster_id` for a command, `name` for a new cluster) was not provided.","error":"qds_sdk.exception.ValidationError: '<parameter_name>' is a required field"},{"fix":"Check the release notes for the `qds-sdk` version you upgraded to. Update your import statements and code to use the new names or paths. For example, `qds_sdk.commands` is where most command classes reside.","cause":"This usually indicates that a module, class, or function name has been changed, moved, or removed in a newer version of the SDK.","error":"AttributeError: module 'qds_sdk' has no attribute 'some_old_module_or_class'"},{"fix":"Verify your internet connection. Check that `QDS_API_URL` environment variable is set to the correct Qubole API endpoint for your region (e.g., `https://api.qubole.com/api/v1.2`). If you are behind a corporate proxy, ensure proxy settings are correctly configured for Python's `requests` library.","cause":"The SDK was unable to establish a connection to the Qubole API endpoint. This could be due to network issues, an incorrect API URL, or proxy configuration problems.","error":"requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.qubole.com', port=443): Max retries exceeded with url: /api/v1.2/..."}]}