Skip to main content

Collibra Import API

Project description

collibra-import_200

The Import API is an efficient way to load large volumes of data into the Collibra Data Governance Center. The API can automatically differentiate between creating and updating data.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • Package version: 2.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import collibra_import 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import collibra_import

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import collibra_import
from collibra_import.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id of the operation.

try:
    # Removes all cache entries corresponding to the provided synchronization id.
    api_instance.evict_synchronization_cache(synchronization_id)
except ApiException as e:
    print("Exception when calling ImportApi->evict_synchronization_cache: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id of the operation.

try:
    # Checks whether given synchronization id already exists.
    api_response = api_instance.exists(synchronization_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->exists: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
offset = 0 # int | The first result to retrieve. If not set (offset = <code>0</code>), results will be retrieved starting from row <code>0</code>. (optional) (default to 0)
limit = 0 # int | The maximum number of results to retrieve. If not set (limit = <code>0</code>), the default limit will be used. The maximum allowed limit is 1000. (optional) (default to 0)
count_limit = -1 # int | Allows to limit the number of elements that will be counted. -1 will count everything and 0 will cause the count to be skipped (optional) (default to -1)

try:
    # Returns synchronization information matching the given search criteria.
    api_response = api_instance.find_synchronization_infos(offset=offset, limit=limit, count_limit=count_limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->find_synchronization_infos: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
separator = 'separator_example' # str |  (optional)
quote = 'quote_example' # str |  (optional)
escape = 'escape_example' # str |  (optional)
strict_quotes = true # bool |  (optional)
ignore_leading_whitespace = true # bool |  (optional)
header_row = true # bool |  (optional)
template = 'template_example' # str |  (optional)

try:
    # Starts import from the CSV file in job (asynchronously).
    api_response = api_instance.import_csv_in_job(send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, separator=separator, quote=quote, escape=escape, strict_quotes=strict_quotes, ignore_leading_whitespace=ignore_leading_whitespace, header_row=header_row, template=template)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->import_csv_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
sheet_name = 'sheet_name_example' # str |  (optional)
sheet_index = 56 # int |  (optional)
header_row = true # bool |  (optional)
template = 'template_example' # str |  (optional)

try:
    # Starts import from the Excel file in job (asynchronously).
    api_response = api_instance.import_excel_in_job(send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, sheet_name=sheet_name, sheet_index=sheet_index, header_row=header_row, template=template)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->import_excel_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
relations_action = 'relations_action_example' # str |  (optional)

try:
    # Starts import from the JSON file in job (asynchronously).
    api_response = api_instance.import_json_in_job(send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, relations_action=relations_action)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->import_json_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id of the operation.

try:
    # Removes all information about synchronization process corresponding to provided synchronization id.
    api_instance.remove_synchronization(synchronization_id)
except ApiException as e:
    print("Exception when calling ImportApi->remove_synchronization: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id used to distinguish different synchronizations.
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
separator = 'separator_example' # str |  (optional)
quote = 'quote_example' # str |  (optional)
escape = 'escape_example' # str |  (optional)
strict_quotes = true # bool |  (optional)
ignore_leading_whitespace = true # bool |  (optional)
header_row = true # bool |  (optional)
template = 'template_example' # str |  (optional)

try:
    # Starts batch synchronization from the CSV file in job (asynchronously).
    api_response = api_instance.synchronize_batch_csv_in_job(synchronization_id, send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, separator=separator, quote=quote, escape=escape, strict_quotes=strict_quotes, ignore_leading_whitespace=ignore_leading_whitespace, header_row=header_row, template=template)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->synchronize_batch_csv_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id used to distinguish different synchronizations.
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
sheet_name = 'sheet_name_example' # str |  (optional)
sheet_index = 56 # int |  (optional)
header_row = true # bool |  (optional)
template = 'template_example' # str |  (optional)

try:
    # Starts batch synchronization from the Excel file in job (asynchronously).
    api_response = api_instance.synchronize_batch_excel_in_job(synchronization_id, send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, sheet_name=sheet_name, sheet_index=sheet_index, header_row=header_row, template=template)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->synchronize_batch_excel_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id used to distinguish different synchronizations.
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
relations_action = 'relations_action_example' # str |  (optional)

try:
    # Starts batch synchronization from the JSON file in job (asynchronously).
    api_response = api_instance.synchronize_batch_json_in_job(synchronization_id, send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, relations_action=relations_action)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->synchronize_batch_json_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id used to distinguish different synchronizations.
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
finalization_strategy = 'finalization_strategy_example' # str |  (optional)
missing_asset_status_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
separator = 'separator_example' # str |  (optional)
quote = 'quote_example' # str |  (optional)
escape = 'escape_example' # str |  (optional)
strict_quotes = true # bool |  (optional)
ignore_leading_whitespace = true # bool |  (optional)
header_row = true # bool |  (optional)
template = 'template_example' # str |  (optional)

try:
    # Starts full synchronization from the CSV file in job (asynchronously).
    api_response = api_instance.synchronize_csv_in_job(synchronization_id, send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, finalization_strategy=finalization_strategy, missing_asset_status_id=missing_asset_status_id, separator=separator, quote=quote, escape=escape, strict_quotes=strict_quotes, ignore_leading_whitespace=ignore_leading_whitespace, header_row=header_row, template=template)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->synchronize_csv_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id used to distinguish different synchronizations.
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
finalization_strategy = 'finalization_strategy_example' # str |  (optional)
missing_asset_status_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
sheet_name = 'sheet_name_example' # str |  (optional)
sheet_index = 56 # int |  (optional)
header_row = true # bool |  (optional)
template = 'template_example' # str |  (optional)

try:
    # Starts full synchronization from the Excel file in job (asynchronously).
    api_response = api_instance.synchronize_excel_in_job(synchronization_id, send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, finalization_strategy=finalization_strategy, missing_asset_status_id=missing_asset_status_id, sheet_name=sheet_name, sheet_index=sheet_index, header_row=header_row, template=template)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->synchronize_excel_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization ID used to distinguish different synchronizations.
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
finalization_strategy = 'finalization_strategy_example' # str |  (optional)
missing_asset_status_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
finalization_parameters = {'key': 'finalization_parameters_example'} # dict(str, str) |  (optional)

try:
    # Starts synchronization finalization in job (asynchronously).
    api_response = api_instance.synchronize_finalize_in_job(synchronization_id, send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, finalization_strategy=finalization_strategy, missing_asset_status_id=missing_asset_status_id, finalization_parameters=finalization_parameters)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->synchronize_finalize_in_job: %s\n" % e)
# Configure HTTP basic authorization: basicAuth
configuration = collibra_import.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = collibra_import.ImportApi(collibra_import.ApiClient(configuration))
synchronization_id = 'synchronization_id_example' # str | The synchronization id used to distinguish different synchronizations.
send_notification = true # bool |  (optional)
batch_size = 56 # int |  (optional)
simulation = true # bool |  (optional)
save_result = true # bool |  (optional)
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)
file = 'file_example' # str |  (optional)
file_name = 'file_name_example' # str |  (optional)
delete_file = true # bool |  (optional)
continue_on_error = true # bool |  (optional)
finalization_strategy = 'finalization_strategy_example' # str |  (optional)
missing_asset_status_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str |  (optional)

try:
    # Starts full synchronization from the JSON file in job (asynchronously).
    api_response = api_instance.synchronize_json_in_job(synchronization_id, send_notification=send_notification, batch_size=batch_size, simulation=simulation, save_result=save_result, file_id=file_id, file=file, file_name=file_name, delete_file=delete_file, continue_on_error=continue_on_error, finalization_strategy=finalization_strategy, missing_asset_status_id=missing_asset_status_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportApi->synchronize_json_in_job: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /rest/2.0

Class Method HTTP request Description
ImportApi evict_synchronization_cache DELETE /import/synchronize/{synchronizationId}/evict Removes all cache entries corresponding to the provided synchronization id.
ImportApi exists GET /import/synchronize/exists/{synchronizationId} Checks whether given synchronization id already exists.
ImportApi find_synchronization_infos GET /import/synchronize Returns synchronization information matching the given search criteria.
ImportApi import_csv_in_job POST /import/csv-job Starts import from the CSV file in job (asynchronously).
ImportApi import_excel_in_job POST /import/excel-job Starts import from the Excel file in job (asynchronously).
ImportApi import_json_in_job POST /import/json-job Starts import from the JSON file in job (asynchronously).
ImportApi remove_synchronization DELETE /import/synchronize/{synchronizationId} Removes all information about synchronization process corresponding to provided synchronization id.
ImportApi synchronize_batch_csv_in_job POST /import/synchronize/{synchronizationId}/batch/csv-job Starts batch synchronization from the CSV file in job (asynchronously).
ImportApi synchronize_batch_excel_in_job POST /import/synchronize/{synchronizationId}/batch/excel-job Starts batch synchronization from the Excel file in job (asynchronously).
ImportApi synchronize_batch_json_in_job POST /import/synchronize/{synchronizationId}/batch/json-job Starts batch synchronization from the JSON file in job (asynchronously).
ImportApi synchronize_csv_in_job POST /import/synchronize/{synchronizationId}/csv-job Starts full synchronization from the CSV file in job (asynchronously).
ImportApi synchronize_excel_in_job POST /import/synchronize/{synchronizationId}/excel-job Starts full synchronization from the Excel file in job (asynchronously).
ImportApi synchronize_finalize_in_job POST /import/synchronize/{synchronizationId}/finalize/job Starts synchronization finalization in job (asynchronously).
ImportApi synchronize_json_in_job POST /import/synchronize/{synchronizationId}/json-job Starts full synchronization from the JSON file in job (asynchronously).
ImportResultsApi find_import_errors GET /import/results/{jobId}/errors List the errors of a finished import job
ImportResultsApi get_import_job_summary GET /import/results/{jobId}/summary Retrieve a summary of a finished import job

Documentation For Models

Documentation For Authorization

basicAuth

  • Type: HTTP basic authentication

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collibra-import_200-2.0.0.tar.gz (68.4 kB view details)

Uploaded Source

Built Distribution

collibra_import_200-2.0.0-py3-none-any.whl (186.7 kB view details)

Uploaded Python 3

File details

Details for the file collibra-import_200-2.0.0.tar.gz.

File metadata

  • Download URL: collibra-import_200-2.0.0.tar.gz
  • Upload date:
  • Size: 68.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for collibra-import_200-2.0.0.tar.gz
Algorithm Hash digest
SHA256 30dd9f563da52192f4af7926c9377d6b7717bedf4a00b618c604d04be9f184b1
MD5 98bc51fade06ea32c1391a22bb19515d
BLAKE2b-256 474cab97aabe0913b411e44affb68a40c466eab7a08fbdedc71d1b5aee44339e

See more details on using hashes here.

File details

Details for the file collibra_import_200-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for collibra_import_200-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 60d33476d3ef7cdc3ab102aa0f403de1ae6aec2f176af65f91e2109271ddc47c
MD5 32b5681e8321e7bf85dafc69d52a3be9
BLAKE2b-256 09483a0dc9a922acfded9e1af8bb9f9a8c11b1a4566af6f437e453d7afc0e7ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page