View on GitHub

lakeFS

lakeFS - Data version control for your data lake | Git for data

lakefs_sdk.RemotesApi

All URIs are relative to /api/v1

Method HTTP request Description
pull_iceberg_table POST /iceberg/remotes/{catalog}/pull take a table previously pushed from lakeFS into a remote catalog, and pull its state back into the originating lakeFS repository
push_iceberg_table POST /iceberg/remotes/{catalog}/push register existing lakeFS table in remote catalog

pull_iceberg_table

pull_iceberg_table(catalog, iceberg_pull_request=iceberg_pull_request)

take a table previously pushed from lakeFS into a remote catalog, and pull its state back into the originating lakeFS repository

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.iceberg_pull_request import IcebergPullRequest
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.RemotesApi(api_client)
    catalog = 'catalog_example' # str | 
    iceberg_pull_request = lakefs_sdk.IcebergPullRequest() # IcebergPullRequest |  (optional)

    try:
        # take a table previously pushed from lakeFS into a remote catalog, and pull its state back into the originating lakeFS repository
        api_instance.pull_iceberg_table(catalog, iceberg_pull_request=iceberg_pull_request)
    except Exception as e:
        print("Exception when calling RemotesApi->pull_iceberg_table: %s\n" % e)

Parameters

Name Type Description Notes
catalog str    
iceberg_pull_request IcebergPullRequest   [optional]

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 successfully pulled table from remote -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

push_iceberg_table

push_iceberg_table(catalog, iceberg_push_request=iceberg_push_request)

register existing lakeFS table in remote catalog

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.iceberg_push_request import IcebergPushRequest
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.RemotesApi(api_client)
    catalog = 'catalog_example' # str | 
    iceberg_push_request = lakefs_sdk.IcebergPushRequest() # IcebergPushRequest |  (optional)

    try:
        # register existing lakeFS table in remote catalog
        api_instance.push_iceberg_table(catalog, iceberg_push_request=iceberg_push_request)
    except Exception as e:
        print("Exception when calling RemotesApi->push_iceberg_table: %s\n" % e)

Parameters

Name Type Description Notes
catalog str    
iceberg_push_request IcebergPushRequest   [optional]

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 successfully pushed table to remote -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]