Esempio n. 1
0
def direct_copy_raw_schema_to_topic(model_schema: ModelSchema, topic: Topic):
    if topic is None:
        topic = Topic()
    topic.topicName = model_schema.name
    topic.factors = convert_business_fields_to_factors(
        model_schema.businessFields)
    return topic
Esempio n. 2
0
def build_topic(model_schema_set: ModelSchemaSet):
    topic = Topic()
    topic.topicId = get_surrogate_key()
    topic.name = model_schema_set.code
    topic.type = "raw"
    topic.factors = []
    parent = ""
    build_factors(topic.factors, parent, model_schema_set.schemas[topic.name],
                  model_schema_set)
    create_topic_schema(topic)