Skip to content

Commit c3b2172

Browse files
committed
resolve
1 parent 328b356 commit c3b2172

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

lib/data_contract.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
def to_atlas_schema(contract):
2-
hcl = f"""
3-
schema "public" {{}}
2+
hcl = f"""schema "public" {{}}
43
54
table "{contract["dataset"]}" {{
65
schema = schema.public

datacontract.py renamed to main.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@
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+

0 commit comments

Comments
 (0)