Пример #1
0
def discover_catalog(connection, catalog):
    catalog = tap_mysql.discover_catalog(connection, catalog)
    streams = []

    for stream in catalog.streams:
        database_name = common.get_database_name(stream)

        if database_name == DB_NAME:
            streams.append(stream)

    catalog.streams = streams

    return catalog
Пример #2
0
def discover_catalog(connection):
    catalog = tap_mysql.discover_catalog(connection)
    catalog.streams = [s for s in catalog.streams if s.database == DB_NAME]
    return catalog