Ejemplo n.º 1
0
    def test_streams_outputs_records(self, catalog_path, stream_config):
        configured_catalog = ConfiguredAirbyteCatalog.parse_file(catalog_path)
        records, states = self._read_records(stream_config, configured_catalog)

        assert records, "should have some records returned"
        if configured_catalog.streams[0].sync_mode == SyncMode.incremental:
            assert states, "should have some states returned"
Ejemplo n.º 2
0
def configured_catalog() -> ConfiguredAirbyteCatalog:
    catalog_filename = HERE.parent / "sample_files" / "configured_catalog.json"
    if not catalog_filename.exists():
        raise RuntimeError(
            f"Please provide configured catalog in {catalog_filename}")

    return ConfiguredAirbyteCatalog.parse_file(catalog_filename)
Ejemplo n.º 3
0
def configured_catalog_fixture():
    return ConfiguredAirbyteCatalog.parse_file(
        "sample_files/configured_catalog.json")
Ejemplo n.º 4
0
def configured_catalog_fixture(
        configured_catalog_path) -> Optional[ConfiguredAirbyteCatalog]:
    if configured_catalog_path:
        return ConfiguredAirbyteCatalog.parse_file(configured_catalog_path)
    return None
Ejemplo n.º 5
0
def configured_catalog_fixture():
    return ConfiguredAirbyteCatalog.parse_file(
        BASE_DIRECTORY /
        "sample_files/configured_catalog_activities_overview.json")