diff --git a/.github/expected_failures.txt b/.github/expected_failures.txt index 9627fc12..3cab1bcc 100644 --- a/.github/expected_failures.txt +++ b/.github/expected_failures.txt @@ -3,7 +3,6 @@ tests/functional/adapter/dbt_clone/test_dbt_clone.py::TestCloneNotPossibleDremio tests/functional/adapter/dremio_specific/test_drop_temp_table.py::TestDropTempTableDremio::test_drop_temp_table tests/functional/adapter/dremio_specific/test_schema_parsing.py::TestSchemaParsingDremio::test_schema_with_dots tests/functional/adapter/dremio_specific/test_verify_ssl.py::TestVerifyCertificateDremio::test_insecure_request_warning_not_exist -tests/functional/adapter/relation/test_get_relation_last_modified.py::TestGetLastRelationModified::test_get_last_relation_modified tests/functional/adapter/unit_testing/test_unit_testing.py::TestDremioUnitTestingTypes::test_unit_test_data_type tests/functional/adapter/unit_testing/test_unit_testing.py::TestDremioUnitTestCaseInsensitivity::test_case_insensitivity tests/functional/adapter/unit_testing/test_unit_testing.py::TestDremioUnitTestInvalidInput::test_invalid_input diff --git a/dbt/include/dremio/macros/adapters/metadata.sql b/dbt/include/dremio/macros/adapters/metadata.sql index c19e00f1..619b43f9 100644 --- a/dbt/include/dremio/macros/adapters/metadata.sql +++ b/dbt/include/dremio/macros/adapters/metadata.sql @@ -307,8 +307,10 @@ limitations under the License.*/ {%- if relation.type != 'view' -%} {%- call statement('last_modified', fetch_result=True) -%} - select max(committed_at) as last_modified, - {{ current_timestamp() }} as snapshotted_at + select '{{ relation.identifier}}' as identifier, + '{{ relation.schema}}' as schema, + max(committed_at) as last_modified, + {{ current_timestamp() }} as snapshotted_at from TABLE( table_snapshot('{{relation}}') ) {%- endcall -%} {%- else -%}