Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRIVIAL: gooddata-dbt - allow to override LDM ID part2 #377

Merged
1 commit merged into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gooddata-dbt/gooddata_dbt/dbt/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def make_grain(self, table: DbtModelTable) -> List[Dict]:
grain = []
for column in table.columns.values():
if self.is_primary_key(column):
grain.append({"id": column.gooddata_ldm_id, "type": "attribute"})
grain.append({"id": column.ldm_id, "type": "attribute"})
return grain

# TODO - constraints are stored in special nodes
Expand Down Expand Up @@ -342,9 +342,9 @@ def make_references(self, table: DbtModelTable, role_playing_tables: Dict) -> Li
if self.upper_case:
referenced_object_name = referenced_object_name.upper()
if referenced_object_name in role_playing_tables:
referenced_object_id = f"{referenced_object_id}_{column.gooddata_ldm_id}"
referenced_object_id = f"{referenced_object_id}_{column.ldm_id}"
elif column.is_date():
referenced_object_id = column.gooddata_ldm_id
referenced_object_id = column.ldm_id
if referenced_object_id is not None:
references.append(
{
Expand Down