SQL Query
SQLQueryBuilder
A builder for developing RTDIP queries using any delta table
Source code in src/sdk/python/rtdip_sdk/queries/sql/sql_query.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
get(connection=object, sql_query=str, to_json=False, limit=None, offset=None)
A function to return back raw data by querying databricks SQL Warehouse using a connection specified by the user.
The available connectors by RTDIP are Databricks SQL Connect, PYODBC SQL Connect, TURBODBC SQL Connect.
The available authentication methods are Certificate Authentication, Client Secret Authentication or Default Authentication. See documentation.
This function requires the user to input a dictionary of parameters. (See Attributes table below)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connection |
obj
|
Connection chosen by the user (Databricks SQL Connect, PYODBC SQL Connect, TURBODBC SQL Connect) |
object
|
sql_query |
str
|
A string of the SQL query to be executed. |
str
|
limit |
optional int
|
Limit the number of rows to be returned |
None
|
offset |
optional int
|
Offset the start of the rows to be returned |
None
|
Returns:
Name | Type | Description |
---|---|---|
DataFrame |
DataFrame
|
A dataframe of data. |
Source code in src/sdk/python/rtdip_sdk/queries/sql/sql_query.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|