Hello Team, Try to load the below model in <GoodDa...
# gooddata-cn
v
Hello Team, Try to load the below model in GoodData.CN but it gives the following error. [{"severity":"ERROR","identifiers":[{"id":"dataset.v_fan_segment_web","type":"dataset"}],"code":"primaryKey.undefined","message":"No primary key defined for dataset dataset.v_fan_segment_web","resolution":""},{"severity":"ERROR","identifiers":[{"id":"dataset.v_fan_segment_web","type":"dataset"}],"code":"attributes.empty","message":"No attribute defined for dataset dataset.v_fan_segment_web","resolution":""}] I have set the reference key(foreign key) from v_fan_types for v_fan_segment_web, still it is asking me for primary key. The data source is big query.
m
Hello Vatsal! Please note that it is mandatory that every dataset has primary key in logical data model (LDM). It can be generated from primary key in tables, but BigQuery does not support it, unfortunately. If you set primary keys in the logical data model, nothing is changed in the PDM (Physical Data Model) or in the data source. Primary Keys in LDM is just a hint for our engine, what is the granularity of the dataset. Please note that Primary Keys must consist of a single LDM attribute. In the future we plan to support multi-attribute PKs. If you would like the Scan generating PKs automatically, you have to utilize the naming convention we provide and then set the corresponding prefix (Primary key prefix) in Scan dialog in “ADVANCED SETTINGS”.
v
Hi @Moises Morales So what about the foreign key, will it not be supported? I am setting the foreign key from the primary key table but it gives error. I have already created a similar model in gooddata cloud there it worked. But the same model i am trying to create it is not working in Gooddata.CN
m
The foreign key is supported, but you still need to set a primary key for every dataset in your LDM. The PK can only be a single LDM attribute.