File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 11def to_atlas_schema (contract ):
2- hcl = f"""
3- schema "public" {{}}
2+ hcl = f"""schema "public" {{}}
43
54table "{ contract ["dataset" ]} " {{
65 schema = schema.public
Original file line number Diff line number Diff line change 6363
6464# Create a table from the data contract
6565
66- # atlas_schema = to_atlas_schema(contract)
67- # schema_file = 'schema.hcl'
68- # with open(schema_file, 'w') as writer:
69- # writer.write(atlas_schema)
70- # print(f'Written Atlas schema of `{contract["dataset"]}` data contract to `{schema_file}`')
71-
72- # protobuf_schema = to_protobuf(contract)
73- # proto_file = 'v1/customers.proto'
74- # with open(proto_file, 'w') as writer:
75- # writer.write(protobuf_schema)
76- # print(f'Written Protobuf schema of `{contract["dataset"]}` data contract to `{proto_file}`')
77- #
66+ atlas_schema = to_atlas_schema (contract )
67+ schema_file = 'schema.hcl'
68+ with open (schema_file , 'w' ) as writer :
69+ writer .write (atlas_schema )
70+ print (f'Written Atlas schema of `{ contract ["dataset" ]} ` data contract to `{ schema_file } `' )
71+
72+ protobuf_schema = to_protobuf (contract )
73+ proto_file = 'v1/customers.proto'
74+ with open (proto_file , 'w' ) as writer :
75+ writer .write (protobuf_schema )
76+ print (f'Written Protobuf schema of `{ contract ["dataset" ]} ` data contract to `{ proto_file } `' )
77+
You can’t perform that action at this time.
0 commit comments