grai_source_bigquery
loader

get_from_env

def get_from_env(label: str,
                 default: Optional[Any] = None,
                 required: bool = True,
                 validator: Optional[Callable] = None)

Arguments:

label (str):

  • default Optional[Any], optional - (Default value = None)
  • required bool, optional - (Default value = True)
  • validator Optional[Callable], optional - (Default value = None)

Returns:

BigqueryConnector Objects

class BigqueryConnector()

connect

def connect() -> "BigqueryConnector"

Arguments:

Returns:

connection

@property
def connection() -> bigquery.Client

Arguments:

Returns:

close

def close() -> None

Arguments:

Returns:

query_runner

def query_runner(query: str, param_dict: Dict = {}) -> List[Dict]

Arguments:

query (str):

  • param_dict Dict, optional - (Default value = {})

Returns:

tables

@lru_cache
def tables(dataset: str) -> List[Table]

Create and return a list of dictionaries with the schemas and names of tables in the database connected to by the connection argument.

Arguments:

Returns:

columns

@lru_cache
def columns(dataset: str) -> List[Column]

Creates and returns a list of dictionaries for the specified schema.table in the database connected to.

Arguments:

Returns:

column_map

@lru_cache
def column_map(dataset: str) -> Dict[Tuple[str, str], List[Column]]

Arguments:

Returns:

get_table_columns

def get_table_columns(table: Table, dataset: str) -> List[Column]

Arguments:

table (Table):

Returns:

get_nodes

def get_nodes(dataset: str) -> List[BigqueryNode]

Arguments:

Returns:

get_edges

def get_edges(dataset: str) -> List[Edge]

Arguments:

Returns:

get_nodes_and_edges

def get_nodes_and_edges() -> Tuple[List[BigqueryNode], List[Edge]]

Arguments:

Returns:

LoggingConnector Objects

class LoggingConnector(BigqueryConnector)

logging_connect

def logging_connect() -> "LoggingConnector"

Arguments:

Returns:

logging_connection

@property
def logging_connection() -> logging.Client

Arguments:

Returns:

logging_close

def logging_close() -> None

Arguments:

Returns:

logs

@cached_property
def logs() -> List[Any]

Create and return a list of dictionaries with the schemas and names of tables in the database connected to by the connection argument.

Arguments:

Returns:

get_bigquery_edges

def get_bigquery_edges(existing_nodes: List[BigqueryNode]) -> List[Edge]

Arguments:

Returns: