airflow.providers.ydb.hooks.ydb

Module Contents

Classes

YDBCursor

YDB cursor wrapper.

YDBConnection

YDB connection wrapper.

YDBHook

Interact with YDB.

Attributes

DEFAULT_YDB_GRPCS_PORT

airflow.providers.ydb.hooks.ydb.DEFAULT_YDB_GRPCS_PORT: int = 2135[source]
class airflow.providers.ydb.hooks.ydb.YDBCursor(delegatee, is_ddl)[source]

YDB cursor wrapper.

property rowcount[source]
property description[source]
execute(sql, parameters=None)[source]
executemany(sql, seq_of_parameters)[source]
executescript(script)[source]
fetchone()[source]
fetchmany(size=None)[source]
fetchall()[source]
nextset()[source]
setinputsizes(sizes)[source]
setoutputsize(column=None)[source]
__enter__()[source]
__exit__(exc_type, exc_val, exc_tb)[source]
close()[source]
class airflow.providers.ydb.hooks.ydb.YDBConnection(ydb_session_pool, is_ddl)[source]

YDB connection wrapper.

cursor()[source]
begin()[source]
commit()[source]
rollback()[source]
__enter__()[source]
__exit__(exc_type, exc_val, exc_tb)[source]
close()[source]
bulk_upsert(table_name, rows, column_types)[source]
class airflow.providers.ydb.hooks.ydb.YDBHook(*args, is_ddl=False, **kwargs)[source]

Bases: airflow.providers.common.sql.hooks.sql.DbApiHook

Interact with YDB.

property sqlalchemy_url: sqlalchemy.engine.URL[source]

Return a Sqlalchemy.engine.URL object from the connection.

Needs to be implemented in the provider subclass to return the sqlalchemy.engine.URL object.

Returns

the extracted sqlalchemy.engine.URL object.

Return type

sqlalchemy.engine.URL

conn_name_attr: str[source]
default_conn_name: str[source]
conn_type: str[source]
hook_name: str = 'YDB'[source]
supports_autocommit: bool = True[source]
supports_executemany: bool = True[source]
classmethod get_connection_form_widgets()[source]

Return connection widgets to add to YDB connection form.

classmethod get_ui_field_behaviour()[source]

Return custom UI field behaviour for YDB connection.

get_conn()[source]

Establish a connection to a YDB database.

bulk_upsert(table_name, rows, column_types)[source]

BulkUpsert into database. More optimal way to insert rows into db.

Was this entry helpful?