Verify exact-run CSV publication
This commit is contained in:
+4
-1
@@ -31,7 +31,10 @@ does not publish a result.
|
|||||||
A report configured against an exact published Dataflow run reads that run's
|
A report configured against an exact published Dataflow run reads that run's
|
||||||
immutable Datasource materialization. It does not rerun the flow with current
|
immutable Datasource materialization. It does not rerun the flow with current
|
||||||
inputs. The evidence identifies the Dataflow run and materialization, and access
|
inputs. The evidence identifies the Dataflow run and materialization, and access
|
||||||
to both is checked again when the report runs.
|
to both is checked again when the report runs. CSV export therefore provides an
|
||||||
|
Excel-readable publication of the exact authorized Dataflow result, with
|
||||||
|
spreadsheet formula markers escaped and the run lineage retained on the
|
||||||
|
Reporting execution.
|
||||||
|
|
||||||
The **Effective access** explanation states when dimensions, measures, source
|
The **Effective access** explanation states when dimensions, measures, source
|
||||||
rows, or actions were removed by Policy. A result with no hidden elements says
|
rows, or actions were removed by Policy. A result with no hidden elements says
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ class ReportingServiceTests(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
self.assertTrue(raised.exception.execution_id)
|
self.assertTrue(raised.exception.execution_id)
|
||||||
|
|
||||||
def test_dataflow_dataset_can_pin_an_exact_published_run(self) -> None:
|
def test_dataflow_run_can_be_exported_as_formula_safe_csv(self) -> None:
|
||||||
payload = dataset_payload()
|
payload = dataset_payload()
|
||||||
rows = list(payload.pop("static_rows"))
|
rows = list(payload.pop("static_rows"))
|
||||||
payload.update(
|
payload.update(
|
||||||
@@ -410,7 +410,7 @@ class ReportingServiceTests(unittest.TestCase):
|
|||||||
report_id="report-1",
|
report_id="report-1",
|
||||||
report_revision=1,
|
report_revision=1,
|
||||||
parameters={},
|
parameters={},
|
||||||
query=None,
|
query=ReportQuery(mode="detail", dimensions=["note"]),
|
||||||
idempotency_key="published-dataflow-run",
|
idempotency_key="published-dataflow-run",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -421,6 +421,15 @@ class ReportingServiceTests(unittest.TestCase):
|
|||||||
provider.last_request.run_ref,
|
provider.last_request.run_ref,
|
||||||
)
|
)
|
||||||
self.assertTrue(result["provenance"]["source"]["immutable_run"])
|
self.assertTrue(result["provenance"]["source"]["immutable_run"])
|
||||||
|
content, content_type, filename = export_execution(
|
||||||
|
self.session,
|
||||||
|
self.principal,
|
||||||
|
execution_id=str(result["execution_id"]),
|
||||||
|
format="csv",
|
||||||
|
)
|
||||||
|
self.assertEqual("text/csv; charset=utf-8", content_type)
|
||||||
|
self.assertTrue(filename.endswith(".csv"))
|
||||||
|
self.assertIn("'=cmd", content.decode("utf-8-sig"))
|
||||||
|
|
||||||
def test_restricted_access_and_service_scope_guards(self) -> None:
|
def test_restricted_access_and_service_scope_guards(self) -> None:
|
||||||
self._create_report_graph(
|
self._create_report_graph(
|
||||||
|
|||||||
Reference in New Issue
Block a user