abacusai.execute_fg_operation

Module Contents

Classes

ExecuteFgOperation

The result of executing a SQL query

class abacusai.execute_fg_operation.ExecuteFgOperation(client, executeFgOperationRunId=None, status=None, error=None)

Bases: abacusai.return_class.AbstractApiClass

The result of executing a SQL query

Parameters:
  • client (ApiClient) – An authenticated API Client instance

  • executeFgOperationRunId (str) – The run id of the operation

  • status (str) – The status of the operation

  • error (str) – The error message if the operation failed

__repr__()

Return repr(self).

to_dict()

Get a dict representation of the parameters in this class

Returns:

The dict value representation of the class parameters

Return type:

dict

wait_for_results(timeout=3600)

A waiting call until query is executed.

Parameters:

timeout (int, optional) – The waiting time given to the call to finish, if it doesn’t finish by the allocated time, the call is said to be timed out.

wait_for_execution(timeout=3600)

A waiting call until query is executed.

Parameters:

timeout (int, optional) – The waiting time given to the call to finish, if it doesn’t finish by the allocated time, the call is said to be timed out.

get_status()

Gets the status of the query execution

Returns:

A string describing the status of a query execution (pending, complete, etc.).

Return type:

str

refresh()

Calls describe and refreshes the current object’s fields

Returns:

The current object

Return type:

DatasetVersion

describe()
_download_avro_file(file_part, tmp_dir)
load_as_pandas(max_workers=10)

Loads the result data into a pandas dataframe

Parameters:

max_workers (int, optional) – The number of threads.

Returns:

A pandas dataframe displaying the data from execution.

Return type:

DataFrame