broad-market-47443
05/16/2023, 10:30 PMjob_title
in database
• Expected: SchemaFieldClass
where label = "Select your job title from the following:"
, fieldPath = "job_title"
, and type = EnumTypeClass
or type = UnionTypeClass
The datahub frontend is a big part of our use case. Is there a way to:
1. Capture the possible values of Engineer, Analyst, Manager
within the the schemaField so that the values can be clearly viewed in the UI?
2. Able to track changes to possible values, as well as the label
, as part of the Technical Schema (ie. frontend users can see historic changes through the UI)?
Thanks so much in advance - big fan of the product!astonishing-answer-96712
05/16/2023, 11:54 PMEnum
here? Would you be so kind as to file a github issue? Also what version are you on?broad-market-47443
05/17/2023, 4:17 PMv0.9.6.1
and I’ve tried Enum and Union, but neither would display the possible values in the UI. Likewise for the label. My workaround is to put those values in the description field, but unfortunately that means changes are not captured in the Technical Schema.broad-market-47443
05/17/2023, 4:18 PMjob_title_enum = SchemaFieldClass(
fieldPath = 'job_title',
type = SchemaFieldDataTypeClass(type=EnumTypeClass()),
nativeDataType = "Dropdown",
description = "Question: **Select your job title from the following:**\n\nPossible Values:\n- `'Engineer'`\n- `'Analyst'`\n- `'Manager'`",
label = "Select your job title from the following:",
jsonProps = json.dumps({'default_values': ['Engineer', 'Analyst', 'Manager']})
)
job_title_union = copy.copy(job_title_enum)
job_title_union.type = SchemaFieldDataTypeClass(type=UnionTypeClass(nestedTypes=['Engineer', 'Analyst', 'Manager']))
broad-market-47443
05/17/2023, 4:18 PMbroad-market-47443
05/18/2023, 2:17 PM