46 | | |
47 | | If the names of shared fields are different in certain instance tables, you can define a field mapping when you configure the instance table (continuing the example from above): |
48 | | |
49 | | {{{#!python |
50 | | |
51 | | # Define the instance table |
52 | | tablename = "my_instance_table" |
53 | | table = self.define_table(tablename, |
54 | | Field("first_date", "datetime"), |
55 | | Field("last_date", "datetime"), |
56 | | *s3_meta_fields()) |
57 | | |
58 | | # Configure the instance table |
59 | | self.configure("my_instance_table", |
60 | | # Configure the super entity |
61 | | super_entity = "my_super_entity", |
62 | | # Map the "first_date" field in my_instance_table to "start_date" in my_super_entity |
63 | | my_super_entity_fields = {"start_date": "first_date"}, |
64 | | ) |
65 | | |
66 | | }}} |