Provided Methods

Method documentation

All the examples expect that there is already a OneDataApi object initialized and assigned to a variable called "onedata_api".

### Creation of the ONE DATA Api ###
onedata_api = OneDataApi(base_url=base_url, username=user,
                         password=pw, verify=False, timeout=999)

createDataTable

Description

Creates a data table with the given name from a connection with the given ID and name.

Optional request options (request_transformers, response_transformers, timeout, verify, sleep_after_response_millis, deserializer) can be specified.

Returns: DataTable

Parameters

PropertyTypeRequiredDefaultDescription
connection_idUnion[str, uuid.UUID]trueID of the connection
connection_table_namestrtrueName of the data table to be copied from the connection
dt_namestrtrueName of the newly created data table
dt_tags[str]falseNoneTags for the new data table
dt_descriptionstrfalseNoneDescription for the new data table
dt_notesstrfalseNoneNotes for the new data table
accessDatabaseTablePrivilegefalseNoneAccess rights of the user for the table of the data base connection
connection_schemastrfalseNoneData base schema which holds the relevant table
target_project_idUnion[str, uuid.UUID]falseNoneID of the projet where the new data table should be created

Usage

### Create new data table from connection ###
dt: DataTable = onedata_api.connections.create_data_table(connection_id="some_id_UUID", connection_table_name="someExistingTable", dt_name="New Table")

paginatedDatabaseTableInformation

Description

Returns all database tables within the database connection with the given ID.

Optional request options (request_transformers, response_transformers, timeout, verify, sleep_after_response_millis, deserializer) can be specified.

Returns: Paginated

Parameters

PropertyTypeRequiredDefaultDescription
connection_idUnion[str, uuid.UUID]trueID of the connection
pageintfalseNoneResult page
limitintfalseNoneItems per page
orderingSortOrderfalseNoneOrder direction
sort_byDatabaseConnectionTableSortTypefalseNoneSort property
project_idUnion[str, uuid.UUID]falseNoneSpecifies the ID of the project for which existing datatables within the db connection will be listed. If None, the existing datatables for the user's preferred project will be returned.
searchstrfalseNonestring to search for desired resources. Search is case insensitive. Name and tags are considered.
tables_listing_modeTablesListingModefalseNoneSpecifies the listing mode for data tables from an Oracle database connection
connection_schemastrfalseNoneData base schema which holds the relevant table
target_project_idUnion[str, uuid.UUID]falseNoneID of the projet where the new data table should be created

Usage

### Get list of database tables ###
datatables: Paginated= onedata_api.connections.paginated_database_table_information(connection_id="some_id_UUID")