Updated on 2025-08-25 GMT+08:00

Getting Started

The code below uses the ibis library to connect to the DataArts Fabric data lake, execute data queries, and convert the results into the basic syntax of the DataFrame format.

The example is for reference only. Modify it as needed.

For more detailed usage of Ibis, refer to official Ibis documentation.

import ibis   # Import Ibis dependencies.
con = ibis.fabric.connect(    # Call the DataArts Fabric backend connection to establish a connection.
endpoint=FABRIC_ENDPOINT,         # Specify the service region. Refer to Regions and Endpoints.
endpoint_id=FABRIC_ENDPOINT_ID,   # Query endpoint_id. See "Appendix" in the API Reference.
domain=FABRIC_DOMAIN,      # Tenant name
user=FABRIC_USER,                  # IAM username
password=FABRIC_PASS,          # IAM password
project_id=FABRIC_PROJECT_ID,    # How Do I Obtain a Project ID?
catelog_name=IBIS_TEST_FABRIC_CATELOG,      # Connect to a specified catalog.
workspace_id=FABRIC_WORKSPACE_ID,   # Get workspace_id. See "Appendix" in the API Reference.
lakeformation_instance_id=IBIS_TEST_FABRIC_LAKEFORMATION_INSTANCE_ID,          # LakeFormation instance ID
obs_directory_base=OBS_DIRECTORY_BASE,   # Storage path for UDFs in OBS
obs_bucket_name=OBS_BUCKET_NAME,      # OBS bucket name
obs_server=OBS_SERVER,    # OBS access address. Refer to Endpoints and Domain Names.
)
t = con.table("table_name", database="db")    # Retrieve table information by connecting to the backend and create a table object.
t.select("cola")   # Query table columns.
df = t.execute()  # Convert DataFrame to SQL, send it to the backend for execution, and return the result in Pandas DataFrame format.