Skip to content

Commit ecbc87b

Browse files
authored
Merge pull request #368 from DKAndreasen/feature/ai-stuff/update-export-queries-6BA76B45
New data extraction
2 parents 741b149 + e60c911 commit ecbc87b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

data-export/export_documents_with_meta.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ left join (
167167
left join paragraph__os2loop_documents_tbl_desc as tbl_desc on tbl_content.entity_id = tbl_desc.entity_id
168168
) as tbl on n_ddc.os2loop_documents_document_conte_target_id = tbl.entity_id
169169
-- where para_ifd.`type` = 'os2loop_documents_table' -- returns 3 of 16 records
170-
left join paragraph__os2loop_documents_title as doc_title on n_ddc.os2loop_documents_document_conte_target_id = doc_title.entity_id
170+
left join `paragraph__os2loop_documents_title` as doc_title on n_ddc.os2loop_documents_document_conte_target_id = doc_title.entity_id
171171
left join paragraph__os2loop_documents_description as doc_desc on n_ddc.os2loop_documents_document_conte_target_id = doc_desc.entity_id -- all para doc desc relates to bundle step_by_step
172172
-- we miss content on step by step paragraphs, (we only have description so far) this must be added post querying using the dedicated query export_folding_parts_of_documents after it have been post-processed by the preprocess_loop_document_folding_parts.py
173173
-- we ignore table of contents as this does not add any additional information conveying text
@@ -194,4 +194,4 @@ left join (
194194
where n_st.bundle = 'os2loop_documents_document'
195195
group by n_st.entity_id) tags on n_fd.nid = tags.entity_id
196196
left join node__os2loop_shared_rev_date as rev_date on n_fd.nid = rev_date.entity_id
197-
left join node__os2loop_shared_version as `version` on n_fd.nid = `version`.entity_id
197+
left join node__os2loop_shared_version as `version` on n_fd.nid = `version`.entity_id

data-export/export_q_and_a_with_meta.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ answer_attachment AS (SELECT
6161

6262
Select -- *,
6363
n_fd.title as title,
64+
n_fd.nid as nid,
6465
pa.alias as relative_public_url,
6566
n_qc.os2loop_question_content_value as question,
6667
DATE_FORMAT(FROM_UNIXTIME(n_fd.created), '%Y-%m-%dT%H:%i:%s') as question_created,

0 commit comments

Comments
 (0)