def METHOD_NAME(self, tmp_query_path):
    query_file = tmp_query_path / "query.sql"
    query_file.write_text(
        "SELECT * FROM telemetry_derived.clients_daily_v6 "
        "WHERE submission_date = '2020-01-01'"
    )
    query_dryrun = DryRun(str(query_file)).get_referenced_tables()
    assert len(query_dryrun) == 1
    assert query_dryrun[0]["datasetId"] == "telemetry_derived"
    assert query_dryrun[0]["tableId"] == "clients_daily_v6"
    view_file = tmp_query_path / "view.sql"
    view_file.write_text(
        """
        CREATE OR REPLACE VIEW
        `moz-fx-data-shared-prod.telemetry.clients_daily`
        AS
        SELECT
        *
        FROM
        `moz-fx-data-shared-prod.telemetry_derived.clients_daily_v6`
    """
    )
    view_dryrun = DryRun(str(view_file), strip_dml=True).get_referenced_tables()
    assert len(view_dryrun) == 1
    assert view_dryrun[0]["datasetId"] == "telemetry_derived"
    assert view_dryrun[0]["tableId"] == "clients_daily_v6"
    view_file.write_text(
        """
    SELECT document_id
    FROM mozdata.org_mozilla_firefox.baseline
    WHERE submission_timestamp > current_timestamp()
    UNION ALL
    SELECT document_id
    FROM mozdata.org_mozilla_fenix.baseline
    WHERE submission_timestamp > current_timestamp()
    """
    )
    multiple_tables = DryRun(str(view_file)).get_referenced_tables()
    multiple_tables.sort(key=lambda x: x["datasetId"])
    assert len(multiple_tables) == 2
    assert multiple_tables[0]["datasetId"] == "org_mozilla_fenix_stable"
    assert multiple_tables[0]["tableId"] == "baseline_v1"
    assert multiple_tables[1]["datasetId"] == "org_mozilla_firefox_stable"
    assert multiple_tables[1]["tableId"] == "baseline_v1"