@@ -206,13 +206,13 @@ def test_to_dbt_models_with_model_level_composite_primary_key():
206206 id = "my-data-contract-id" ,
207207 info = Info (title = "My Data Contract" , version = "0.0.1" ),
208208 models = {
209- "sfdc_loc_tenants_test " : Model (
209+ "test_table " : Model (
210210 type = "table" ,
211- primaryKey = ["tenant_id " , "account_id " ], # Model-level composite primary key
211+ primaryKey = ["order_id " , "user_id " ], # Model-level composite primary key
212212 fields = {
213- "tenant_id " : Field (type = "string" , required = True ),
214- "account_id " : Field (type = "string" , required = True ),
215- "name " : Field (type = "string" , required = True ),
213+ "order_id " : Field (type = "string" , required = True ),
214+ "user_id " : Field (type = "string" , required = True ),
215+ "product_id " : Field (type = "string" , required = True )
216216 },
217217 )
218218 },
@@ -221,7 +221,7 @@ def test_to_dbt_models_with_model_level_composite_primary_key():
221221 expected_dbt_model = """
222222version: 2
223223models:
224- - name: sfdc_loc_tenants_test
224+ - name: test_table
225225 config:
226226 meta:
227227 data_contract: my-data-contract-id
@@ -231,18 +231,18 @@ def test_to_dbt_models_with_model_level_composite_primary_key():
231231 data_tests:
232232 - dbt_utils.unique_combination_of_columns:
233233 combination_of_columns:
234- - tenant_id
235- - account_id
234+ - order_id
235+ - user_id
236236 columns:
237- - name: tenant_id
237+ - name: order_id
238238 data_type: STRING
239239 constraints:
240240 - type: not_null
241- - name: account_id
241+ - name: user_id
242242 data_type: STRING
243243 constraints:
244244 - type: not_null
245- - name: name
245+ - name: product_id
246246 data_type: STRING
247247 constraints:
248248 - type: not_null
@@ -263,13 +263,13 @@ def test_to_dbt_models_with_single_column_primary_key():
263263 id = "my-data-contract-id" ,
264264 info = Info (title = "My Data Contract" , version = "0.0.1" ),
265265 models = {
266- "sfdc_loc_tenants_test " : Model (
266+ "test_table " : Model (
267267 type = "table" ,
268- primaryKey = ["tenant_id " ], # Model-level single primary key
268+ primaryKey = ["order_id " ], # Model-level single primary key
269269 fields = {
270- "tenant_id " : Field (type = "string" , required = True ),
271- "account_id " : Field (type = "string" , required = True ),
272- "name " : Field (type = "string" , required = True ),
270+ "order_id " : Field (type = "string" , required = True ),
271+ "user_id " : Field (type = "string" , required = True ),
272+ "product_id " : Field (type = "string" , required = True )
273273 },
274274 )
275275 },
@@ -278,24 +278,24 @@ def test_to_dbt_models_with_single_column_primary_key():
278278 expected_dbt_model = """
279279version: 2
280280models:
281- - name: sfdc_loc_tenants_test
281+ - name: test_table
282282 config:
283283 meta:
284284 data_contract: my-data-contract-id
285285 materialized: table
286286 contract:
287287 enforced: true
288288 columns:
289- - name: tenant_id
289+ - name: order_id
290290 data_type: STRING
291291 constraints:
292292 - type: not_null
293293 - type: unique
294- - name: account_id
294+ - name: user_id
295295 data_type: STRING
296296 constraints:
297297 - type: not_null
298- - name: name
298+ - name: product_id
299299 data_type: STRING
300300 constraints:
301301 - type: not_null
0 commit comments