Skip to content

Commit 7b51490

Browse files
authored
Populate data for used-tables widget in assessment dashboard (#2866)
## Changes Our current implementation only generates DFSA records. This PR implements samples that generate regular legacy tables that will be displayed in the used-tables wdget ### Linked issues None ### Functionality None ### Tests - [x] updated integration tests Co-authored-by: Eric Vergnaud <[email protected]>
1 parent c323321 commit 7b51490

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/integration/conftest.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -559,12 +559,18 @@ def make_grant( # pylint: disable=too-many-arguments
559559

560560
def make_linting_resources(self) -> None:
561561
"""Make resources to lint."""
562-
notebook_job = self._make_job(content="spark.read.parquet('dbfs://mnt/notebook/')")
563-
file_job = self._make_job(content="spark.read.parquet('dbfs://mnt/file/')", task_type=SparkPythonTask)
564-
query = self._make_query(sql_query='SELECT * from parquet.`dbfs://mnt/foo2/bar2`')
565-
dashboard = self._make_dashboard(query=query)
566-
self._jobs.extend([notebook_job, file_job])
567-
self._dashboards.append(dashboard)
562+
notebook_job_1 = self._make_job(content="spark.read.parquet('dbfs://mnt/notebook/')")
563+
notebook_job_2 = self._make_job(content="spark.table('old.stuff')")
564+
file_job_1 = self._make_job(content="spark.read.parquet('dbfs://mnt/file/')", task_type=SparkPythonTask)
565+
file_job_2 = self._make_job(content="spark.table('some.table')", task_type=SparkPythonTask)
566+
query_1 = self._make_query(sql_query='SELECT * from parquet.`dbfs://mnt/foo2/bar2`')
567+
dashboard_1 = self._make_dashboard(query=query_1)
568+
query_2 = self._make_query(sql_query='SELECT * from my_schema.my_table')
569+
dashboard_2 = self._make_dashboard(query=query_2)
570+
571+
self._jobs.extend([notebook_job_1, notebook_job_2, file_job_1, file_job_2])
572+
self._dashboards.append(dashboard_1)
573+
self._dashboards.append(dashboard_2)
568574

569575
def add_table(self, table: TableInfo):
570576
self._tables.append(table)

0 commit comments

Comments
 (0)