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

TS Events - Project information shows as NULL #80

Open
mcoles opened this issue Sep 14, 2023 · 1 comment
Open

TS Events - Project information shows as NULL #80

mcoles opened this issue Sep 14, 2023 · 1 comment

Comments

@mcoles
Copy link
Contributor

mcoles commented Sep 14, 2023

Another problem from the 2023.1 schema change that alters the way content is mapped to projects. Need to update the joins for all the different content types in this data source to fix it.

Note that Historical Project Name still works, as that's tracked in the hist_projects table, so it's not affected by the join issue.

@another-tom
Copy link

another-tom commented Mar 20, 2024

I hacked around it by using the logic used to create the _worbooks view that uses the new project_contents table. I used the following customSQL to replace public.workbooks

select
	workbooks.id,
	workbooks."name",
	workbooks.repository_url,
	workbooks.description,
	workbooks.created_at,
	workbooks.updated_at,
	workbooks.owner_id,
	--workbooks.project_id,
	projects_contents.project_id  as project_id,
	workbooks.view_count,
	workbooks."size",
	workbooks.embedded,
	workbooks.thumb_user,
	workbooks.refreshable_extracts,
	workbooks.extracts_refreshed_at,
	workbooks.lock_version,
	workbooks.state,
	workbooks."version",
	workbooks.checksum,
	workbooks.display_tabs,
	workbooks.data_engine_extracts,
	workbooks.incrementable_extracts,
	workbooks.site_id,
	workbooks.revision,
	workbooks.repository_data_id,
	workbooks.repository_extract_data_id,
	workbooks.first_published_at,
	workbooks.primary_content_url,
	workbooks.share_description,
	workbooks.show_toolbar,
	workbooks.extracts_incremented_at,
	workbooks.default_view_index,
	workbooks.luid,
	workbooks.asset_key_id,
	workbooks.document_version,
	workbooks.content_version,
	workbooks.last_published_at,
	workbooks.data_id,
	workbooks.reduced_data_id,
	workbooks.published_all_sheets,
	workbooks.extract_encryption_state,
	workbooks.extract_creation_pending,
	workbooks.is_deleted,
	workbooks.parent_workbook_id,
	workbooks.is_private,
	workbooks.modified_by_user_id,
	workbooks.extract_storage_format
FROM
	 public.workbooks
	LEFT JOIN projects_contents ON projects_contents.content_id = workbooks.id AND projects_contents.content_type::text = 'workbook'::text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants