This repository was archived by the owner on Sep 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +28
-4
lines changed
tests/functional/adapter/utils Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 1+ kind : Features
2+ body : Migrate dbt-utils current_timestamp macros into core + adapters
3+ time : 2022-09-26T12:36:09.319981-07:00
4+ custom :
5+ Author : colin-rogers-dbt
6+ Issue : " 483"
7+ PR : " 480"
Original file line number Diff line number Diff line change 209209 {{ return(load_result(' list_schemas' ).table) }}
210210{% endmacro %}
211211
212- {% macro spark__current_timestamp() - %}
213- current_timestamp ()
214- {%- endmacro %}
215-
216212{% macro spark__rename_relation(from_relation, to_relation) - %}
217213 {% call statement(' rename_relation' ) - %}
218214 {% if not from_relation .type %}
Original file line number Diff line number Diff line change 1+ {% macro spark__current_timestamp() - %}
2+ current_timestamp ()
3+ {%- endmacro %}
Original file line number Diff line number Diff line change 1+ import pytest
2+ from dbt .tests .adapter .utils .test_timestamps import BaseCurrentTimestamps
3+
4+
5+ class TestCurrentTimestampSpark (BaseCurrentTimestamps ):
6+ @pytest .fixture (scope = "class" )
7+ def models (self ):
8+ return {"get_current_timestamp.sql" : "select {{ current_timestamp() }} as current_timestamp" }
9+
10+ @pytest .fixture (scope = "class" )
11+ def expected_schema (self ):
12+ return {
13+ "current_timestamp" : "timestamp"
14+ }
15+
16+ @pytest .fixture (scope = "class" )
17+ def expected_sql (self ):
18+ return """select current_timestamp() as current_timestamp"""
You can’t perform that action at this time.
0 commit comments