%3 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp->2. model.qualtrics_source.stg_qualtrics__block_question 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp->1. model.qualtrics_source.stg_qualtrics__block 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp->8. model.qualtrics_source.stg_qualtrics__directory_contact 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp->7. model.qualtrics_source.stg_qualtrics__directory 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp->14. model.qualtrics_source.stg_qualtrics__distribution_contact 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp->13. model.qualtrics_source.stg_qualtrics__distribution 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp->18. model.qualtrics_source.stg_qualtrics__question_option 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp->20. model.qualtrics_source.stg_qualtrics__question_response 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp->17. model.qualtrics_source.stg_qualtrics__question 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp->23. model.qualtrics_source.stg_qualtrics__sub_question 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp->28. model.qualtrics_source.stg_qualtrics__survey_response 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp->25. model.qualtrics_source.stg_qualtrics__survey 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp->31. model.qualtrics_source.stg_qualtrics__survey_version 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp->33. model.qualtrics_source.stg_qualtrics__user 35. source.qualtrics_source.qualtrics.block 35. source.qualtrics_source.qualtrics.block 35. source.qualtrics_source.qualtrics.block->4. model.qualtrics_source.stg_qualtrics__block_tmp 36. source.qualtrics_source.qualtrics.block_question 36. source.qualtrics_source.qualtrics.block_question 36. source.qualtrics_source.qualtrics.block_question->3. model.qualtrics_source.stg_qualtrics__block_question_tmp 37. source.qualtrics_source.qualtrics.contact_mailing_list_membership 37. source.qualtrics_source.qualtrics.contact_mailing_list_membership 37. source.qualtrics_source.qualtrics.contact_mailing_list_membership->6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 38. source.qualtrics_source.qualtrics.directory 38. source.qualtrics_source.qualtrics.directory 38. source.qualtrics_source.qualtrics.directory->12. model.qualtrics_source.stg_qualtrics__directory_tmp 39. source.qualtrics_source.qualtrics.directory_contact 39. source.qualtrics_source.qualtrics.directory_contact 39. source.qualtrics_source.qualtrics.directory_contact->9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 40. source.qualtrics_source.qualtrics.directory_mailing_list 40. source.qualtrics_source.qualtrics.directory_mailing_list 40. source.qualtrics_source.qualtrics.directory_mailing_list->11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 41. source.qualtrics_source.qualtrics.distribution 41. source.qualtrics_source.qualtrics.distribution 41. source.qualtrics_source.qualtrics.distribution->16. model.qualtrics_source.stg_qualtrics__distribution_tmp 42. source.qualtrics_source.qualtrics.distribution_contact 42. source.qualtrics_source.qualtrics.distribution_contact 42. source.qualtrics_source.qualtrics.distribution_contact->15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 43. source.qualtrics_source.qualtrics.question 43. source.qualtrics_source.qualtrics.question 43. source.qualtrics_source.qualtrics.question->22. model.qualtrics_source.stg_qualtrics__question_tmp 44. source.qualtrics_source.qualtrics.question_option 44. source.qualtrics_source.qualtrics.question_option 44. source.qualtrics_source.qualtrics.question_option->19. model.qualtrics_source.stg_qualtrics__question_option_tmp 45. source.qualtrics_source.qualtrics.question_response 45. source.qualtrics_source.qualtrics.question_response 45. source.qualtrics_source.qualtrics.question_response->21. model.qualtrics_source.stg_qualtrics__question_response_tmp 46. source.qualtrics_source.qualtrics.sub_question 46. source.qualtrics_source.qualtrics.sub_question 46. source.qualtrics_source.qualtrics.sub_question->24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 47. source.qualtrics_source.qualtrics.survey 47. source.qualtrics_source.qualtrics.survey 47. source.qualtrics_source.qualtrics.survey->30. model.qualtrics_source.stg_qualtrics__survey_tmp 48. source.qualtrics_source.qualtrics.survey_embedded_data 48. source.qualtrics_source.qualtrics.survey_embedded_data 48. source.qualtrics_source.qualtrics.survey_embedded_data->27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 49. source.qualtrics_source.qualtrics.survey_response 49. source.qualtrics_source.qualtrics.survey_response 49. source.qualtrics_source.qualtrics.survey_response->29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 50. source.qualtrics_source.qualtrics.survey_version 50. source.qualtrics_source.qualtrics.survey_version 50. source.qualtrics_source.qualtrics.survey_version->32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 51. source.qualtrics_source.qualtrics.user 51. source.qualtrics_source.qualtrics.user 51. source.qualtrics_source.qualtrics.user->34. model.qualtrics_source.stg_qualtrics__user_tmp
1. model.qualtrics_source.stg_qualtrics__block

This SQL query performs a series of transformations on data from a Qualtrics block table. It starts by selecting all columns from a temporary staging table, then defines a set of fields with specific data types. Finally, it renames and reorganizes these fields, including changing some column names for clarity (e.g., 'block_locking' to 'is_locked', 'id' to 'block_id'). The query doesn't filter, deduplicate, or aggregate data, but it does standardize the data types and structure of the output.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__block_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS block_locking,
    CAST(NULL AS TEXT) AS block_visibility,
    CAST(NULL AS TEXT) AS description,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS TEXT) AS randomize_questions,
    CAST(NULL AS TEXT) AS survey_id,
    CAST(NULL AS TEXT) AS type,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    block_locking AS is_locked,
    block_visibility,
    description,
    id AS block_id,
    randomize_questions,
    survey_id,
    type,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block is_deleted _fivetran_synced is_locked block_visibility description block_id randomize_questions survey_id type source_relation 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp id survey_id _fivetran_deleted _fivetran_synced block_locking block_visibility description randomize_questions type 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f5 4. model.qualtrics_source.stg_qualtrics__block_tmp:f1->1. model.qualtrics_source.stg_qualtrics__block:f7 4. model.qualtrics_source.stg_qualtrics__block_tmp:f2->1. model.qualtrics_source.stg_qualtrics__block:f0 4. model.qualtrics_source.stg_qualtrics__block_tmp:f3->1. model.qualtrics_source.stg_qualtrics__block:f1 4. model.qualtrics_source.stg_qualtrics__block_tmp:f4->1. model.qualtrics_source.stg_qualtrics__block:f2 4. model.qualtrics_source.stg_qualtrics__block_tmp:f5->1. model.qualtrics_source.stg_qualtrics__block:f3 4. model.qualtrics_source.stg_qualtrics__block_tmp:f6->1. model.qualtrics_source.stg_qualtrics__block:f4 4. model.qualtrics_source.stg_qualtrics__block_tmp:f7->1. model.qualtrics_source.stg_qualtrics__block:f6 4. model.qualtrics_source.stg_qualtrics__block_tmp:f8->1. model.qualtrics_source.stg_qualtrics__block:f8
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
is_locked integer Boolean representing whether modification of the block and its contents is prevented.
block_visibility integer Whether the questions in the block are 'collapsed' or 'expanded' by default.
description text Description given to the block.
block_id text The ID of the survey block. Match pattern = ^BL_[a-zA-Z0-9]{11,15}$
randomize_questions integer If/how the block questions are randomized. Can be - `false` (no randomization), `RandomWithXPerPage` (randomize all and place X questions in each block), `RandomWithOnlyX` (randomly present only X out of the total questions), or `Advanced` (custom configuration)
survey_id text The unique identifier for this survey. Match pattern = ^SV_[a-zA-Z0-9]{11,15}$
type text Type of block. Can be `Trash`, `Default`, or `Standard`
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp _fivetran_deleted 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block is_deleted 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[_fivetran_deleted]
    • Cleaning The column is cast as BOOLEAN
    • Direct The column is directly copied and renamed to 'is_deleted'
    • Output Columns:
      • is_deleted: Directly mapped after renaming
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp _fivetran_synced 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block _fivetran_synced 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[_fivetran_synced]
    • Cleaning The column is cast as TIMESTAMP
    • Direct The column is directly copied without transformation
    • Output Columns:
      • _fivetran_synced: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp block_locking 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block is_locked 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[block_locking]
    • Cleaning The column is cast as TEXT and renamed to 'is_locked'
    • Output Columns:
      • is_locked: Directly mapped after renaming
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp block_visibility 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block block_visibility 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[block_visibility]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • block_visibility: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp description 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block description 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[description]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • description: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp id 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block block_id 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[id]
    • Cleaning The column is cast as TEXT and renamed to 'block_id'
    • Output Columns:
      • block_id: Directly mapped after renaming
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp randomize_questions 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block randomize_questions 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[randomize_questions]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • randomize_questions: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp survey_id 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block survey_id 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[survey_id]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • survey_id: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp type 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block type 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[type]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • type: Directly mapped
2. model.qualtrics_source.stg_qualtrics__block_question

This SQL query performs a basic data transformation on the 'stg_qualtrics__block_question_tmp' table. It casts specific columns to defined data types, renames some columns, and introduces a 'source_relation' column with an empty string value. The query doesn't perform any filtering, joining, or aggregation operations. It's primarily focused on standardizing the data structure and preparing it for further use.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__block_question_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS block_id,
    CAST(NULL AS TEXT) AS question_id,
    CAST(NULL AS TEXT) AS survey_id,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    block_id,
    question_id,
    survey_id,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question is_deleted _fivetran_synced block_id question_id survey_id source_relation 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp block_id question_id survey_id _fivetran_deleted _fivetran_synced 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f2 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f1->2. model.qualtrics_source.stg_qualtrics__block_question:f3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f2->2. model.qualtrics_source.stg_qualtrics__block_question:f4 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f3->2. model.qualtrics_source.stg_qualtrics__block_question:f0 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f4->2. model.qualtrics_source.stg_qualtrics__block_question:f1
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
block_id text The ID of the survey block. Match pattern = ^BL_[a-zA-Z0-9]{11,15}$
question_id text The unique identifier for the question. Match pattern = ^QID[a-zA-Z0-9]+$
survey_id text The unique identifier for this survey. Match pattern = ^SV_[a-zA-Z0-9]{11,15}$
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp _fivetran_deleted 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question is_deleted 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[_fivetran_deleted]
    • Cleaning The column is cast to BOOLEAN data type
    • Output Columns:
      • is_deleted: Renamed from '_fivetran_deleted' and directly copied after casting
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp _fivetran_synced 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question _fivetran_synced 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[_fivetran_synced]
    • Cleaning The column is cast to TIMESTAMP data type
    • Output Columns:
      • _fivetran_synced: Directly copied after casting
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp block_id 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question block_id 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[block_id]
    • Cleaning The column is cast to TEXT data type
    • Output Columns:
      • block_id: Directly copied after casting
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp question_id 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question question_id 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[question_id]
    • Cleaning The column is cast to TEXT data type
    • Output Columns:
      • question_id: Directly copied after casting
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp survey_id 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question survey_id 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[survey_id]
    • Cleaning The column is cast to TEXT data type
    • Output Columns:
      • survey_id: Directly copied after casting
3. model.qualtrics_source.stg_qualtrics__block_question_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of TEXT data type. It's likely used as a placeholder or template for a staging table in a dbt (data build tool) project, specifically for Qualtrics data related to block questions.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp block_id question_id survey_id _fivetran_deleted _fivetran_synced 36. source.qualtrics_source.qualtrics.block_question 36. source.qualtrics_source.qualtrics.block_question
Name Type Comment
block_id text None
question_id text None
survey_id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp block_id 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question block_id 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[block_id]
    • Cleaning The column is cast to TEXT data type
    • Output Columns:
      • block_id: Directly copied after casting
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp question_id 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question question_id 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[question_id]
    • Cleaning The column is cast to TEXT data type
    • Output Columns:
      • question_id: Directly copied after casting
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp survey_id 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question survey_id 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[survey_id]
    • Cleaning The column is cast to TEXT data type
    • Output Columns:
      • survey_id: Directly copied after casting
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp _fivetran_deleted 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question is_deleted 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[_fivetran_deleted]
    • Cleaning The column is cast to BOOLEAN data type
    • Output Columns:
      • is_deleted: Renamed from '_fivetran_deleted' and directly copied after casting
Column Lineage
%3 3. model.qualtrics_source.stg_qualtrics__block_question_tmp 3. model.qualtrics_source.stg_qualtrics__block_question_tmp _fivetran_synced 2. model.qualtrics_source.stg_qualtrics__block_question 2. model.qualtrics_source.stg_qualtrics__block_question _fivetran_synced 3. model.qualtrics_source.stg_qualtrics__block_question_tmp:f0->2. model.qualtrics_source.stg_qualtrics__block_question:f0
2. model.qualtrics_source.stg_qualtrics__block_question
  • Input Column: 3. model.qualtrics_source.stg_qualtrics__block_question_tmp[_fivetran_synced]
    • Cleaning The column is cast to TIMESTAMP data type
    • Output Columns:
      • _fivetran_synced: Directly copied after casting
4. model.qualtrics_source.stg_qualtrics__block_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of TEXT data type, which is set to NULL. The query doesn't retrieve any actual data as it uses LIMIT 0.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp id survey_id _fivetran_deleted _fivetran_synced block_locking block_visibility description randomize_questions type 35. source.qualtrics_source.qualtrics.block 35. source.qualtrics_source.qualtrics.block
Name Type Comment
id text None
survey_id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
block_locking integer None
block_visibility integer None
description text None
randomize_questions integer None
type text None
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp id 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block block_id 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[id]
    • Cleaning The column is cast as TEXT and renamed to 'block_id'
    • Output Columns:
      • block_id: Directly mapped after renaming
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp survey_id 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block survey_id 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[survey_id]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • survey_id: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp _fivetran_deleted 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block is_deleted 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[_fivetran_deleted]
    • Cleaning The column is cast as BOOLEAN
    • Direct The column is directly copied and renamed to 'is_deleted'
    • Output Columns:
      • is_deleted: Directly mapped after renaming
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp _fivetran_synced 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block _fivetran_synced 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[_fivetran_synced]
    • Cleaning The column is cast as TIMESTAMP
    • Direct The column is directly copied without transformation
    • Output Columns:
      • _fivetran_synced: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp block_locking 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block is_locked 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[block_locking]
    • Cleaning The column is cast as TEXT and renamed to 'is_locked'
    • Output Columns:
      • is_locked: Directly mapped after renaming
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp block_visibility 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block block_visibility 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[block_visibility]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • block_visibility: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp description 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block description 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[description]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • description: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp randomize_questions 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block randomize_questions 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[randomize_questions]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • randomize_questions: Directly mapped
Column Lineage
%3 4. model.qualtrics_source.stg_qualtrics__block_tmp 4. model.qualtrics_source.stg_qualtrics__block_tmp type 1. model.qualtrics_source.stg_qualtrics__block 1. model.qualtrics_source.stg_qualtrics__block type 4. model.qualtrics_source.stg_qualtrics__block_tmp:f0->1. model.qualtrics_source.stg_qualtrics__block:f0
1. model.qualtrics_source.stg_qualtrics__block
  • Input Column: 4. model.qualtrics_source.stg_qualtrics__block_tmp[type]
    • Cleaning The column is cast as TEXT
    • Direct The column is directly copied without transformation
    • Output Columns:
      • type: Directly mapped
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership

This SQL query performs data cleaning and transformation on the 'stg_qualtrics__contact_mailing_list_membership_tmp' table. It casts columns to specific data types, renames some columns, and restructures the data. The query doesn't filter, deduplicate, or aggregate data, but it does standardize the data format and structure.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS contact_id,
    CAST(NULL AS TEXT) AS contact_lookup_id,
    CAST(NULL AS TEXT) AS directory_id,
    CAST(NULL AS TEXT) AS mailing_list_id,
    CAST(NULL AS TEXT) AS name,
    CAST(NULL AS TEXT) AS owner_id,
    CAST(NULL AS TIMESTAMP) AS unsubscribe_date,
    CAST(NULL AS BOOLEAN) AS unsubscribed,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    contact_id,
    contact_lookup_id,
    directory_id,
    mailing_list_id,
    name,
    owner_id AS owner_user_id,
    CAST(unsubscribe_date AS TIMESTAMP) AS unsubscribed_at,
    unsubscribed AS is_unsubscribed,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership _fivetran_synced contact_id contact_lookup_id directory_id mailing_list_id name owner_user_id unsubscribed_at is_unsubscribed source_relation 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp contact_lookup_id _fivetran_synced contact_id directory_id mailing_list_id name owner_id unsubscribe_date unsubscribed 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f2 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f1->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f2->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f1 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f3->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f4->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f4 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f5->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f5 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f6->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f6 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f7->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f7 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f8->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f8
Name Type Comment
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
contact_id text The ID for the contact. Example - CID_012345678901234
contact_lookup_id text Optional contact lookup ID for individual distribution.
directory_id text The directory ID, also known as a pool ID. Example - POOL_012345678901234
mailing_list_id text The ID for the mailing list.
name text Name of the mailing list.
owner_user_id text The unique identifier for a specific user who owns this.
unsubscribed_at timestamp without time zone Date and time the user opted out of this mailing list.
is_unsubscribed boolean Boolean indicating whether the contact has opted out of receiving email through this mailing list.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp _fivetran_synced 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership _fivetran_synced 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • _fivetran_synced: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp contact_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership contact_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[contact_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • contact_id: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp contact_lookup_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership contact_lookup_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[contact_lookup_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • contact_lookup_id: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp directory_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership directory_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[directory_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • directory_id: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp mailing_list_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership mailing_list_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[mailing_list_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • mailing_list_id: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp name 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership name 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • name: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp owner_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership owner_user_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[owner_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • owner_user_id: Renamed and directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp unsubscribe_date 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership unsubscribed_at 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[unsubscribe_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • unsubscribed_at: Renamed and cast as TIMESTAMP
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp unsubscribed 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership is_unsubscribed 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[unsubscribed]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN
    • Output Columns:
      • is_unsubscribed: Renamed and directly mapped
6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for further development or testing purposes.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp contact_lookup_id _fivetran_synced contact_id directory_id mailing_list_id name owner_id unsubscribe_date unsubscribed 37. source.qualtrics_source.qualtrics.contact_mailing_list_membership 37. source.qualtrics_source.qualtrics.contact_mailing_list_membership
Name Type Comment
contact_lookup_id text None
_fivetran_synced timestamp without time zone None
contact_id text None
directory_id text None
mailing_list_id text None
name text None
owner_id text None
unsubscribe_date timestamp without time zone None
unsubscribed boolean None
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp contact_lookup_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership contact_lookup_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[contact_lookup_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • contact_lookup_id: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp _fivetran_synced 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership _fivetran_synced 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • _fivetran_synced: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp contact_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership contact_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[contact_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • contact_id: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp directory_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership directory_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[directory_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • directory_id: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp mailing_list_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership mailing_list_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[mailing_list_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • mailing_list_id: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp name 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership name 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • name: Directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp owner_id 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership owner_user_id 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[owner_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • owner_user_id: Renamed and directly mapped
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp unsubscribe_date 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership unsubscribed_at 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[unsubscribe_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • unsubscribed_at: Renamed and cast as TIMESTAMP
Column Lineage
%3 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp unsubscribed 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership 5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership is_unsubscribed 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp:f0->5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership:f0
5. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership
  • Input Column: 6. model.qualtrics_source.stg_qualtrics__contact_mailing_list_membership_tmp[unsubscribed]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN
    • Output Columns:
      • is_unsubscribed: Renamed and directly mapped
7. model.qualtrics_source.stg_qualtrics__directory

This SQL query performs a series of transformations on data from a Qualtrics directory source. It starts by selecting all columns from a temporary staging table, then casts specific columns to appropriate data types, and finally renames and reorganizes the columns. The query also includes some boolean flags for deduplication criteria, though these are initially set to NULL. The purpose seems to be to standardize and prepare the Qualtrics directory data for further use or analysis.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__directory_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS BOOLEAN) AS deduplication_criteria_email,
    CAST(NULL AS BOOLEAN) AS deduplication_criteria_external_data_reference,
    CAST(NULL AS BOOLEAN) AS deduplication_criteria_first_name,
    CAST(NULL AS BOOLEAN) AS deduplication_criteria_last_name,
    CAST(NULL AS BOOLEAN) AS deduplication_criteria_phone,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS BOOLEAN) AS is_default,
    CAST(NULL AS TEXT) AS name,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    deduplication_criteria_email AS is_deduped_on_email,
    deduplication_criteria_external_data_reference AS is_deduped_on_ext_ref,
    deduplication_criteria_first_name AS is_deduped_on_first_name,
    deduplication_criteria_last_name AS is_deduped_on_last_name,
    deduplication_criteria_phone AS is_deduped_on_phone,
    id AS directory_id,
    is_default,
    name,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deleted _fivetran_synced is_deduped_on_email is_deduped_on_ext_ref is_deduped_on_first_name is_deduped_on_last_name is_deduped_on_phone directory_id is_default name source_relation 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp id _fivetran_deleted _fivetran_synced deduplication_criteria_email deduplication_criteria_external_data_reference deduplication_criteria_first_name deduplication_criteria_last_name deduplication_criteria_phone is_default name 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f7 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f1->7. model.qualtrics_source.stg_qualtrics__directory:f0 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f2->7. model.qualtrics_source.stg_qualtrics__directory:f1 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f3->7. model.qualtrics_source.stg_qualtrics__directory:f2 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f4->7. model.qualtrics_source.stg_qualtrics__directory:f3 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f5->7. model.qualtrics_source.stg_qualtrics__directory:f4 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f6->7. model.qualtrics_source.stg_qualtrics__directory:f5 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f7->7. model.qualtrics_source.stg_qualtrics__directory:f6 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f8->7. model.qualtrics_source.stg_qualtrics__directory:f8 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f9->7. model.qualtrics_source.stg_qualtrics__directory:f9
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
is_deduped_on_email boolean Boolean representing if directory contacts are deduped based on email.
is_deduped_on_ext_ref boolean Boolean representing if directory contacts are deduped based on an external data reference.
is_deduped_on_first_name boolean Boolean representing if directory contacts are deduped based on first name.
is_deduped_on_last_name boolean Boolean representing if directory contacts are deduped based on last name.
is_deduped_on_phone boolean Boolean representing if directory contacts are deduped based on phone number.
directory_id text The directory ID, also known as a pool ID. Example - POOL_012345678901234
is_default boolean Boolean representing if this directory is the default one for your brand. The default directory will be the first directory listed in the dropdown menu in Qualtrics.
name text Name of the directory.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp _fivetran_deleted 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deleted 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deleted: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp _fivetran_synced 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory _fivetran_synced 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TIMESTAMP type
    • Output Columns:
      • _fivetran_synced: Directly mapped without renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_email 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_email 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_email]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_email: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_external_data_reference 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_ext_ref 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_external_data_reference]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_ext_ref: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_first_name 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_first_name 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_first_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_first_name: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_last_name 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_last_name 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_last_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_last_name: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_phone 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_phone 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_phone]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_phone: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp id 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory directory_id 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • directory_id: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp is_default 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_default 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[is_default]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_default: Directly mapped without renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp name 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory name 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • name: Directly mapped without renaming
8. model.qualtrics_source.stg_qualtrics__directory_contact

This SQL query stages data from a temporary Qualtrics directory contact table. It performs type casting, standardizes email and phone formats, and renames some columns. The query also adds a source relation column and structures the final output.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__directory_contact_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TIMESTAMP) AS creation_date,
    CAST(NULL AS TEXT) AS directory_id,
    CAST(NULL AS TIMESTAMP) AS directory_unsubscribe_date,
    CAST(NULL AS BOOLEAN) AS directory_unsubscribed,
    CAST(NULL AS TEXT) AS email,
    CAST(NULL AS TEXT) AS email_domain,
    CAST(NULL AS TEXT) AS ext_ref,
    CAST(NULL AS TEXT) AS first_name,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS TEXT) AS language,
    CAST(NULL AS TIMESTAMP) AS last_modified,
    CAST(NULL AS TEXT) AS last_name,
    CAST(NULL AS TEXT) AS phone,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    CAST(creation_date AS TIMESTAMP) AS created_at,
    directory_id,
    CAST(directory_unsubscribe_date AS TIMESTAMP) AS unsubscribed_from_directory_at,
    directory_unsubscribed AS is_unsubscribed_from_directory,
    LOWER(email) AS email,
    LOWER(email_domain) AS email_domain,
    ext_ref,
    first_name,
    last_name,
    REGEXP_REPLACE(phone, '[^0-9]', '') AS phone, /* remove any non-numeric chars */
    id AS contact_id,
    language,
    CAST(last_modified AS TIMESTAMP) AS last_modified_at,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact _fivetran_synced created_at directory_id unsubscribed_from_directory_at is_unsubscribed_from_directory email email_domain ext_ref first_name contact_id language last_modified_at last_name phone source_relation 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp directory_id id _fivetran_synced creation_date directory_unsubscribe_date directory_unsubscribed email email_domain ext_ref first_name language last_modified last_name phone 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f2 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f1->8. model.qualtrics_source.stg_qualtrics__directory_contact:f9 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f2->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f3->8. model.qualtrics_source.stg_qualtrics__directory_contact:f1 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f4->8. model.qualtrics_source.stg_qualtrics__directory_contact:f3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f5->8. model.qualtrics_source.stg_qualtrics__directory_contact:f4 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f6->8. model.qualtrics_source.stg_qualtrics__directory_contact:f5 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f7->8. model.qualtrics_source.stg_qualtrics__directory_contact:f6 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f8->8. model.qualtrics_source.stg_qualtrics__directory_contact:f7 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f9->8. model.qualtrics_source.stg_qualtrics__directory_contact:f8 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f10->8. model.qualtrics_source.stg_qualtrics__directory_contact:f10 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f11->8. model.qualtrics_source.stg_qualtrics__directory_contact:f11 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f12->8. model.qualtrics_source.stg_qualtrics__directory_contact:f12 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f13->8. model.qualtrics_source.stg_qualtrics__directory_contact:f13
Name Type Comment
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
created_at timestamp without time zone The creation date and time of the record, expressed as an ISO 8601 value.
directory_id text The directory ID, also known as a pool ID. Example - POOL_012345678901234
unsubscribed_from_directory_at timestamp without time zone Date and time the user opted out of the directory.
is_unsubscribed_from_directory boolean Boolean indicating whether the contact unsubscribed from all contact from the Directory.
email text Contact's email address. Must be in proper email format.
email_domain text Domain of the contact's email address.
ext_ref integer The external reference for the contact.
first_name text Contact's first name.
contact_id text The ID for the contact. Example - CID_012345678901234
language integer The user's default language.
last_modified_at timestamp without time zone The point in time when the record was last modified.
last_name text Contact's surname.
phone text Contact's phone number.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp _fivetran_synced 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact _fivetran_synced 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[_fivetran_synced]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • _fivetran_synced: Cleaned and directly copied
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp creation_date 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact created_at 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[creation_date]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • created_at: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp directory_id 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact directory_id 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[directory_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • directory_id: Directly copied
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp directory_unsubscribe_date 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact unsubscribed_from_directory_at 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[directory_unsubscribe_date]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • unsubscribed_from_directory_at: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp directory_unsubscribed 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact is_unsubscribed_from_directory 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[directory_unsubscribed]
    • Cleaning The column is cleaned by casting to BOOLEAN
    • Output Columns:
      • is_unsubscribed_from_directory: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp email 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact email 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[email]
    • Cleaning The column is cleaned by casting to TEXT and converting to lowercase
    • Output Columns:
      • email: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp email_domain 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact email_domain 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[email_domain]
    • Cleaning The column is cleaned by casting to TEXT and converting to lowercase
    • Output Columns:
      • email_domain: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp ext_ref 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact ext_ref 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[ext_ref]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • ext_ref: Directly copied to the output column
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp first_name 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact first_name 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[first_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • first_name: Directly copied to the output column
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp id 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact contact_id 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[id]
    • Cleaning The column is cleaned by casting to TEXT and then directly copied
    • Output Columns:
      • contact_id: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp language 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact language 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[language]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • language: Directly copied to the output column
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp last_modified 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact last_modified_at 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[last_modified]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • last_modified_at: Transformed and renamed to last_modified_at
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp last_name 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact last_name 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[last_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • last_name: Directly copied to the output column
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp phone 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact phone 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[phone]
    • Cleaning The column is cleaned by removing any non-numeric characters using REGEXP_REPLACE
    • Output Columns:
      • phone: Cleaned and mapped to the output column
9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of TEXT data type. It's likely used as a placeholder or template for further development or testing purposes.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp directory_id id _fivetran_synced creation_date directory_unsubscribe_date directory_unsubscribed email email_domain embedded_data_last_active_time embedded_data_last_response_date embedded_data_login_date ext_ref first_name language last_modified last_name phone write_blanks 39. source.qualtrics_source.qualtrics.directory_contact 39. source.qualtrics_source.qualtrics.directory_contact
Name Type Comment
directory_id text None
id text None
_fivetran_synced timestamp without time zone None
creation_date text None
directory_unsubscribe_date timestamp without time zone None
directory_unsubscribed boolean None
email text None
email_domain text None
embedded_data_last_active_time integer None
embedded_data_last_response_date integer None
embedded_data_login_date integer None
ext_ref integer None
first_name text None
language integer None
last_modified text None
last_name text None
phone character varying None
write_blanks integer None
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp directory_id 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact directory_id 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[directory_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • directory_id: Directly copied
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp id 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact contact_id 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[id]
    • Cleaning The column is cleaned by casting to TEXT and then directly copied
    • Output Columns:
      • contact_id: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp _fivetran_synced 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact _fivetran_synced 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[_fivetran_synced]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • _fivetran_synced: Cleaned and directly copied
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp creation_date 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact created_at 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[creation_date]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • created_at: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp directory_unsubscribe_date 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact unsubscribed_from_directory_at 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[directory_unsubscribe_date]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • unsubscribed_from_directory_at: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp directory_unsubscribed 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact is_unsubscribed_from_directory 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[directory_unsubscribed]
    • Cleaning The column is cleaned by casting to BOOLEAN
    • Output Columns:
      • is_unsubscribed_from_directory: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp email 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact email 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[email]
    • Cleaning The column is cleaned by casting to TEXT and converting to lowercase
    • Output Columns:
      • email: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp email_domain 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact email_domain 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[email_domain]
    • Cleaning The column is cleaned by casting to TEXT and converting to lowercase
    • Output Columns:
      • email_domain: Cleaned and mapped
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp ext_ref 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact ext_ref 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[ext_ref]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • ext_ref: Directly copied to the output column
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp first_name 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact first_name 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[first_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • first_name: Directly copied to the output column
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp language 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact language 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[language]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • language: Directly copied to the output column
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp last_modified 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact last_modified_at 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[last_modified]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • last_modified_at: Transformed and renamed to last_modified_at
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp last_name 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact last_name 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[last_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • last_name: Directly copied to the output column
Column Lineage
%3 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp phone 8. model.qualtrics_source.stg_qualtrics__directory_contact 8. model.qualtrics_source.stg_qualtrics__directory_contact phone 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp:f0->8. model.qualtrics_source.stg_qualtrics__directory_contact:f0
8. model.qualtrics_source.stg_qualtrics__directory_contact
  • Input Column: 9. model.qualtrics_source.stg_qualtrics__directory_contact_tmp[phone]
    • Cleaning The column is cleaned by removing any non-numeric characters using REGEXP_REPLACE
    • Output Columns:
      • phone: Cleaned and mapped to the output column
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list

This SQL query stages data from a temporary table for a Qualtrics directory mailing list. It casts columns to specific data types, renames some columns, and prepares the data for further processing. The query doesn't perform any filtering, deduplication, or aggregation, but focuses on cleaning and standardizing the data structure.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__directory_mailing_list_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TIMESTAMP) AS creation_date,
    CAST(NULL AS TEXT) AS directory_id,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS TIMESTAMP) AS last_modified_date,
    CAST(NULL AS TEXT) AS name,
    CAST(NULL AS TEXT) AS owner_id,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    CAST(creation_date AS TIMESTAMP) AS created_at,
    directory_id,
    id AS mailing_list_id,
    CAST(last_modified_date AS TIMESTAMP) AS last_modified_at,
    name,
    owner_id AS owner_user_id,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list is_deleted _fivetran_synced created_at directory_id mailing_list_id last_modified_at name owner_user_id source_relation 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp directory_id id _fivetran_deleted _fivetran_synced creation_date last_modified_date name owner_id 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f1->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f4 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f2->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f3->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f1 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f4->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f2 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f5->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f5 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f6->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f6 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f7->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f7
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
created_at timestamp without time zone The creation date and time of the record, expressed as an ISO 8601 value.
directory_id text The directory ID, also known as a pool ID. Example - POOL_012345678901234
mailing_list_id text The ID for the mailing list.
last_modified_at timestamp without time zone The point in time when the record was last modified.
name text Name of the mailing list.
owner_user_id text The unique identifier for a specific user who owns this.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp _fivetran_deleted 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list is_deleted 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[_fivetran_deleted]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN in the 'fields' CTE
    • Output Columns:
      • is_deleted: Renamed from '_fivetran_deleted' to 'is_deleted' in the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp _fivetran_synced 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list _fivetran_synced 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE
    • Output Columns:
      • _fivetran_synced: Directly copied to the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp creation_date 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list created_at 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[creation_date]
    • Cleaning The column is cast as TIMESTAMP in both 'fields' and 'final' CTEs
    • Output Columns:
      • created_at: Renamed from 'creation_date' to 'created_at' and cast as TIMESTAMP in the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp directory_id 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list directory_id 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[directory_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • directory_id: Directly copied to the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp id 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list mailing_list_id 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • mailing_list_id: Renamed from 'id' to 'mailing_list_id' in the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp last_modified_date 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list last_modified_at 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[last_modified_date]
    • Cleaning The column is cast as TIMESTAMP in both 'fields' and 'final' CTEs
    • Output Columns:
      • last_modified_at: Renamed from 'last_modified_date' to 'last_modified_at' and cast as TIMESTAMP in the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp name 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list name 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • name: Directly copied to the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp owner_id 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list owner_user_id 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[owner_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • owner_user_id: Renamed from 'owner_id' to 'owner_user_id' in the output
11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for further development or testing purposes in a dbt (data build tool) project, specifically for a staging model related to Qualtrics directory mailing lists.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp directory_id id _fivetran_deleted _fivetran_synced creation_date last_modified_date name owner_id 40. source.qualtrics_source.qualtrics.directory_mailing_list 40. source.qualtrics_source.qualtrics.directory_mailing_list
Name Type Comment
directory_id text None
id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
creation_date text None
last_modified_date text None
name text None
owner_id text None
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp directory_id 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list directory_id 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[directory_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • directory_id: Directly copied to the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp id 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list mailing_list_id 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • mailing_list_id: Renamed from 'id' to 'mailing_list_id' in the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp _fivetran_deleted 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list is_deleted 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[_fivetran_deleted]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN in the 'fields' CTE
    • Output Columns:
      • is_deleted: Renamed from '_fivetran_deleted' to 'is_deleted' in the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp _fivetran_synced 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list _fivetran_synced 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE
    • Output Columns:
      • _fivetran_synced: Directly copied to the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp creation_date 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list created_at 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[creation_date]
    • Cleaning The column is cast as TIMESTAMP in both 'fields' and 'final' CTEs
    • Output Columns:
      • created_at: Renamed from 'creation_date' to 'created_at' and cast as TIMESTAMP in the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp last_modified_date 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list last_modified_at 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[last_modified_date]
    • Cleaning The column is cast as TIMESTAMP in both 'fields' and 'final' CTEs
    • Output Columns:
      • last_modified_at: Renamed from 'last_modified_date' to 'last_modified_at' and cast as TIMESTAMP in the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp name 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list name 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • name: Directly copied to the output
Column Lineage
%3 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp owner_id 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list 10. model.qualtrics_source.stg_qualtrics__directory_mailing_list owner_user_id 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp:f0->10. model.qualtrics_source.stg_qualtrics__directory_mailing_list:f0
10. model.qualtrics_source.stg_qualtrics__directory_mailing_list
  • Input Column: 11. model.qualtrics_source.stg_qualtrics__directory_mailing_list_tmp[owner_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • owner_user_id: Renamed from 'owner_id' to 'owner_user_id' in the output
12. model.qualtrics_source.stg_qualtrics__directory_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for further operations in a dbt (data build tool) project, particularly for staging Qualtrics directory data.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp id _fivetran_deleted _fivetran_synced deduplication_criteria_email deduplication_criteria_external_data_reference deduplication_criteria_first_name deduplication_criteria_last_name deduplication_criteria_phone is_default name 38. source.qualtrics_source.qualtrics.directory 38. source.qualtrics_source.qualtrics.directory
Name Type Comment
id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
deduplication_criteria_email boolean None
deduplication_criteria_external_data_reference boolean None
deduplication_criteria_first_name boolean None
deduplication_criteria_last_name boolean None
deduplication_criteria_phone boolean None
is_default boolean None
name text None
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp id 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory directory_id 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • directory_id: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp _fivetran_deleted 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deleted 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deleted: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp _fivetran_synced 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory _fivetran_synced 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TIMESTAMP type
    • Output Columns:
      • _fivetran_synced: Directly mapped without renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_email 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_email 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_email]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_email: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_external_data_reference 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_ext_ref 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_external_data_reference]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_ext_ref: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_first_name 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_first_name 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_first_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_first_name: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_last_name 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_last_name 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_last_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_last_name: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp deduplication_criteria_phone 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_deduped_on_phone 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[deduplication_criteria_phone]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_deduped_on_phone: Directly mapped after renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp is_default 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory is_default 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[is_default]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN type
    • Output Columns:
      • is_default: Directly mapped without renaming
Column Lineage
%3 12. model.qualtrics_source.stg_qualtrics__directory_tmp 12. model.qualtrics_source.stg_qualtrics__directory_tmp name 7. model.qualtrics_source.stg_qualtrics__directory 7. model.qualtrics_source.stg_qualtrics__directory name 12. model.qualtrics_source.stg_qualtrics__directory_tmp:f0->7. model.qualtrics_source.stg_qualtrics__directory:f0
7. model.qualtrics_source.stg_qualtrics__directory
  • Input Column: 12. model.qualtrics_source.stg_qualtrics__directory_tmp[name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • name: Directly mapped without renaming
13. model.qualtrics_source.stg_qualtrics__distribution

This SQL query performs data transformation and cleaning on a Qualtrics distribution dataset. It starts by selecting all columns from a temporary staging table, then casts each column to a specific data type in the 'fields' CTE. The 'final' CTE renames some columns, adjusts data types (especially for date/time fields), and selects the transformed columns. The query primarily focuses on standardizing data types and column names to prepare the data for further analysis or integration into a data warehouse.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__distribution_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TIMESTAMP) AS created_date,
    CAST(NULL AS TEXT) AS header_from_email,
    CAST(NULL AS TEXT) AS header_from_name,
    CAST(NULL AS TEXT) AS header_reply_to_email,
    CAST(NULL AS TEXT) AS header_subject,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS TEXT) AS message_library_id,
    CAST(NULL AS TEXT) AS message_message_id,
    CAST(NULL AS TEXT) AS message_message_text,
    CAST(NULL AS TIMESTAMP) AS modified_date,
    CAST(NULL AS TEXT) AS organization_id,
    CAST(NULL AS TEXT) AS owner_id,
    CAST(NULL AS TEXT) AS parent_distribution_id,
    CAST(NULL AS TEXT) AS recipient_contact_id,
    CAST(NULL AS TEXT) AS recipient_library_id,
    CAST(NULL AS TEXT) AS recipient_mailing_list_id,
    CAST(NULL AS TEXT) AS recipient_sample_id,
    CAST(NULL AS TEXT) AS request_status,
    CAST(NULL AS TEXT) AS request_type,
    CAST(NULL AS TIMESTAMP) AS send_date,
    CAST(NULL AS TIMESTAMP) AS survey_link_expiration_date,
    CAST(NULL AS TEXT) AS survey_link_link_type,
    CAST(NULL AS TEXT) AS survey_link_survey_id,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    CAST(created_date AS TIMESTAMP) AS created_at,
    header_from_email,
    header_from_name,
    header_reply_to_email,
    header_subject,
    id AS distribution_id,
    message_library_id,
    message_message_id AS message_id,
    message_message_text AS message_text,
    CAST(modified_date AS TIMESTAMP) AS last_modified_at,
    organization_id,
    owner_id AS owner_user_id,
    parent_distribution_id,
    recipient_contact_id,
    recipient_library_id,
    recipient_mailing_list_id,
    recipient_sample_id,
    request_status,
    request_type,
    CAST(send_date AS TIMESTAMP) AS send_at,
    CAST(survey_link_expiration_date AS TIMESTAMP) AS survey_link_expires_at,
    survey_link_link_type AS survey_link_type,
    survey_link_survey_id AS survey_id,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution is_deleted _fivetran_synced created_at header_from_email header_from_name header_reply_to_email header_subject distribution_id message_library_id message_id message_text last_modified_at organization_id owner_user_id parent_distribution_id recipient_contact_id recipient_library_id recipient_mailing_list_id recipient_sample_id request_status request_type send_at survey_link_expires_at survey_link_type survey_id source_relation 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp id _fivetran_deleted _fivetran_synced created_date header_from_email header_from_name header_reply_to_email header_subject message_library_id message_message_id message_message_text modified_date organization_id owner_id parent_distribution_id recipient_contact_id recipient_library_id recipient_mailing_list_id recipient_sample_id request_status request_type send_date survey_link_expiration_date survey_link_link_type survey_link_survey_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f7 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f1->13. model.qualtrics_source.stg_qualtrics__distribution:f0 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f2->13. model.qualtrics_source.stg_qualtrics__distribution:f1 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f3->13. model.qualtrics_source.stg_qualtrics__distribution:f2 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f4->13. model.qualtrics_source.stg_qualtrics__distribution:f3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f5->13. model.qualtrics_source.stg_qualtrics__distribution:f4 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f6->13. model.qualtrics_source.stg_qualtrics__distribution:f5 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f7->13. model.qualtrics_source.stg_qualtrics__distribution:f6 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f8->13. model.qualtrics_source.stg_qualtrics__distribution:f8 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f9->13. model.qualtrics_source.stg_qualtrics__distribution:f9 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f10->13. model.qualtrics_source.stg_qualtrics__distribution:f10 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f11->13. model.qualtrics_source.stg_qualtrics__distribution:f11 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f12->13. model.qualtrics_source.stg_qualtrics__distribution:f12 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f13->13. model.qualtrics_source.stg_qualtrics__distribution:f13 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f14->13. model.qualtrics_source.stg_qualtrics__distribution:f14 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f15->13. model.qualtrics_source.stg_qualtrics__distribution:f15 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f16->13. model.qualtrics_source.stg_qualtrics__distribution:f16 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f17->13. model.qualtrics_source.stg_qualtrics__distribution:f17 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f18->13. model.qualtrics_source.stg_qualtrics__distribution:f18 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f19->13. model.qualtrics_source.stg_qualtrics__distribution:f19 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f20->13. model.qualtrics_source.stg_qualtrics__distribution:f20 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f21->13. model.qualtrics_source.stg_qualtrics__distribution:f21 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f22->13. model.qualtrics_source.stg_qualtrics__distribution:f22 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f23->13. model.qualtrics_source.stg_qualtrics__distribution:f23 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f24->13. model.qualtrics_source.stg_qualtrics__distribution:f24
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
created_at timestamp without time zone The creation date and time of the record, expressed as an ISO 8601 value.
header_from_email text Email from address.
header_from_name text Email from name.
header_reply_to_email text Email reply-to address.
header_subject text Email subject; text or message id (MS_).
distribution_id text The unique Distribution ID.
message_library_id integer Library ID of the message.
message_id integer The ID for the desired library message.
message_text integer Text of the message to send.
last_modified_at timestamp without time zone The point in time when the record was last modified.
organization_id text ID of the organization/brand this record belongs to.
owner_user_id text The unique identifier for a specific user who owns this.
parent_distribution_id integer The unique ID of the parent distribution.
recipient_contact_id text The contact ID of the recipient. Can point to `directory_contact` or `core_contact`.
recipient_library_id text Library ID of the message.
recipient_mailing_list_id text The mailing list or contact group associated with the distribution(s). Can point to `directory_mailing_list` or `core_mailing_list`.
recipient_sample_id text The ID for the desired sample. Can point to `directory_sample` or `core_sample` (not included in package).
request_status text The distribution's status. States include `Pending` and `Done`. The Pending state is for email that is scheduled to be sent at a later time.
request_type text The distribution's type. Types include `Invite`, `Reminder`, and `ThankYou`.
send_at timestamp without time zone The date and time the request will be or was sent (in ISO 8601 format). Note that this date and time could be in the future if the email distribution is scheduled to send after a delay.
survey_link_expires_at timestamp without time zone The expiration date for the link associated with the survey distribution. Null if `request_type` != `Invite`.
survey_link_type text The link type (`Individual`, `Anonymous`, or `Multiple`) for the link associated with the survey distribution. Null if `request_type` != `Invite`.
survey_id text The unique survey ID. Will be non-null even if `request_type` != `Invite`.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp _fivetran_deleted 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution is_deleted 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to BOOLEAN type in the 'fields' CTE
    • Output Columns:
      • is_deleted: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp _fivetran_synced 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution _fivetran_synced 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TIMESTAMP type in the 'fields' CTE
    • Output Columns:
      • _fivetran_synced: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp created_date 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution created_at 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[created_date]
    • Cleaning The column is cast to TIMESTAMP type in both 'fields' and 'final' CTEs
    • Output Columns:
      • created_at: Mapped after casting to TIMESTAMP
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp header_from_email 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution header_from_email 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[header_from_email]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • header_from_email: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp header_from_name 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution header_from_name 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[header_from_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • header_from_name: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp header_reply_to_email 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution header_reply_to_email 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[header_reply_to_email]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • header_reply_to_email: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp header_subject 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution header_subject 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[header_subject]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • header_subject: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution distribution_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • distribution_id: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp message_library_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution message_library_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[message_library_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • message_library_id: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp message_message_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution message_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[message_message_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • message_id: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp message_message_text 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution message_text 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[message_message_text]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • message_text: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp modified_date 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution last_modified_at 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[modified_date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then cast again in the 'final' CTE
    • Output Columns:
      • last_modified_at: Mapped with type casting and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp organization_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution organization_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[organization_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • organization_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp owner_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution owner_user_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[owner_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • owner_user_id: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp parent_distribution_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution parent_distribution_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[parent_distribution_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • parent_distribution_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp recipient_contact_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution recipient_contact_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[recipient_contact_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • recipient_contact_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp recipient_library_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution recipient_library_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[recipient_library_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • recipient_library_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp recipient_mailing_list_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution recipient_mailing_list_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[recipient_mailing_list_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • recipient_mailing_list_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp recipient_sample_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution recipient_sample_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[recipient_sample_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • recipient_sample_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp request_status 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution request_status 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[request_status]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • request_status: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp request_type 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution request_type 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[request_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • request_type: Directly mapped to this output column
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp send_date 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution send_at 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[send_date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then cast again as TIMESTAMP in the 'final' CTE
    • Output Columns:
      • send_at: Mapped to this output column after casting
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp survey_link_survey_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution survey_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[survey_link_survey_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • survey_id: Mapped to this output column
14. model.qualtrics_source.stg_qualtrics__distribution_contact

This SQL query performs a basic staging operation on the Qualtrics distribution contact data. It starts by selecting all columns from a temporary table, then defines a set of fields with specific data types (mostly casting to NULL or empty string). Finally, it selects these fields, casting some timestamp fields explicitly, and creates the final output. The query doesn't perform any complex transformations, filtering, or aggregations; it's primarily focused on structuring the data with defined data types.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__distribution_contact_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS contact_frequency_rule_id,
    CAST(NULL AS TEXT) AS contact_id,
    CAST(NULL AS TEXT) AS contact_lookup_id,
    CAST(NULL AS TEXT) AS distribution_id,
    CAST(NULL AS TIMESTAMP) AS opened_at,
    CAST(NULL AS TIMESTAMP) AS response_completed_at,
    CAST(NULL AS TEXT) AS response_id,
    CAST(NULL AS TIMESTAMP) AS response_started_at,
    CAST(NULL AS TIMESTAMP) AS sent_at,
    CAST(NULL AS TEXT) AS status,
    CAST(NULL AS TEXT) AS survey_link,
    CAST(NULL AS TEXT) AS survey_session_id,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    contact_frequency_rule_id,
    contact_id,
    contact_lookup_id,
    distribution_id,
    CAST(opened_at AS TIMESTAMP) AS opened_at,
    CAST(response_completed_at AS TIMESTAMP) AS response_completed_at,
    response_id,
    CAST(response_started_at AS TIMESTAMP) AS response_started_at,
    CAST(sent_at AS TIMESTAMP) AS sent_at,
    status,
    survey_link,
    survey_session_id,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact _fivetran_synced contact_frequency_rule_id contact_id contact_lookup_id distribution_id opened_at response_completed_at response_id response_started_at sent_at status survey_link survey_session_id source_relation 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp contact_id distribution_id _fivetran_synced contact_frequency_rule_id contact_lookup_id opened_at response_completed_at response_id response_started_at sent_at status survey_link survey_session_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f2 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f1->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f4 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f2->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f3->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f1 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f4->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f5->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f5 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f6->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f6 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f7->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f7 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f8->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f8 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f9->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f9 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f10->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f10 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f11->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f11 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f12->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f12
Name Type Comment
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
contact_frequency_rule_id integer The contact frequency Rule ID. Ex - FQ_AAB234234
contact_id text The ID for the contact. Example - CID_012345678901234
contact_lookup_id text Optional contact lookup ID for individual distribution.
distribution_id text The unique Distribution ID.
opened_at timestamp without time zone The time a survey was opened by the respondent, will be null if the survey has not been opened.
response_completed_at timestamp without time zone The time a response was completed, will be null for uncompleted surveys.
response_id integer The ID of the survey response submitted by this contact. If no survey response has been submitted, this value will be null. If the survey was setup to anonymize responses, then this value will be `Anonymous`.
response_started_at timestamp without time zone The time a response was started by the respondent, will be null if survey has not been started.
sent_at timestamp without time zone The time a survey was sent to the respondent.
status text One of ([full descriptions](https://api.qualtrics.com/fc8017650d0b9-distribution-status)): - `Pending` - `Success` - `Error` - `Opened` - `Complaint` - `Skipped` - `Blocked` - `Failure` - `Unknown` - `SoftBounce` - `HardBounce` - `SurveyStarted` - `SurveyPartiallyFinished` - `SurveyFinished` - `SurveyScreenedOut` - `SessionExpired`
survey_link text The survey link sent with the distribution. This is null when no link was sent.
survey_session_id integer An identifier that represents the session in which the respondent interacted with the survey
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp _fivetran_synced 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact _fivetran_synced 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_synced: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp contact_frequency_rule_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact contact_frequency_rule_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[contact_frequency_rule_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • contact_frequency_rule_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp contact_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact contact_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[contact_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • contact_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp contact_lookup_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact contact_lookup_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[contact_lookup_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • contact_lookup_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp distribution_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact distribution_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[distribution_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • distribution_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp opened_at 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact opened_at 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[opened_at]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • opened_at: Casted to TIMESTAMP and copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp response_completed_at 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact response_completed_at 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[response_completed_at]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • response_completed_at: Casted to TIMESTAMP and copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp response_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact response_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[response_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp response_started_at 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact response_started_at 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[response_started_at]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • response_started_at: Casted to TIMESTAMP and copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp sent_at 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact sent_at 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[sent_at]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • sent_at: Casted to TIMESTAMP and copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp status 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact status 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[status]
    • Direct The status column is directly copied without any transformation
    • Output Columns:
      • status: Directly copied to the output 'status' column
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp survey_link 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact survey_link 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[survey_link]
    • Direct The survey_link column is directly copied without any transformation
    • Output Columns:
      • survey_link: Directly copied to the output 'survey_link' column
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp survey_session_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact survey_session_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[survey_session_id]
    • Direct The survey_session_id column is directly copied without any transformation
    • Output Columns:
      • survey_session_id: Directly copied to the output 'survey_session_id' column
15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for a staging table in a dbt (data build tool) project, specifically for Qualtrics distribution contact data.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp contact_id distribution_id _fivetran_synced contact_frequency_rule_id contact_lookup_id opened_at response_completed_at response_id response_started_at sent_at status survey_link survey_session_id 42. source.qualtrics_source.qualtrics.distribution_contact 42. source.qualtrics_source.qualtrics.distribution_contact
Name Type Comment
contact_id text None
distribution_id text None
_fivetran_synced timestamp without time zone None
contact_frequency_rule_id integer None
contact_lookup_id text None
opened_at text None
response_completed_at timestamp without time zone None
response_id integer None
response_started_at timestamp without time zone None
sent_at text None
status text None
survey_link text None
survey_session_id integer None
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp contact_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact contact_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[contact_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • contact_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp distribution_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact distribution_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[distribution_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • distribution_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp _fivetran_synced 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact _fivetran_synced 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_synced: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp contact_frequency_rule_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact contact_frequency_rule_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[contact_frequency_rule_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • contact_frequency_rule_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp contact_lookup_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact contact_lookup_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[contact_lookup_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • contact_lookup_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp opened_at 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact opened_at 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[opened_at]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • opened_at: Casted to TIMESTAMP and copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp response_completed_at 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact response_completed_at 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[response_completed_at]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • response_completed_at: Casted to TIMESTAMP and copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp response_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact response_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[response_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_id: Directly copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp response_started_at 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact response_started_at 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[response_started_at]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • response_started_at: Casted to TIMESTAMP and copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp sent_at 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact sent_at 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[sent_at]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • sent_at: Casted to TIMESTAMP and copied to the output
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp status 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact status 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[status]
    • Direct The status column is directly copied without any transformation
    • Output Columns:
      • status: Directly copied to the output 'status' column
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp survey_link 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact survey_link 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[survey_link]
    • Direct The survey_link column is directly copied without any transformation
    • Output Columns:
      • survey_link: Directly copied to the output 'survey_link' column
Column Lineage
%3 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp survey_session_id 14. model.qualtrics_source.stg_qualtrics__distribution_contact 14. model.qualtrics_source.stg_qualtrics__distribution_contact survey_session_id 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp:f0->14. model.qualtrics_source.stg_qualtrics__distribution_contact:f0
14. model.qualtrics_source.stg_qualtrics__distribution_contact
  • Input Column: 15. model.qualtrics_source.stg_qualtrics__distribution_contact_tmp[survey_session_id]
    • Direct The survey_session_id column is directly copied without any transformation
    • Output Columns:
      • survey_session_id: Directly copied to the output 'survey_session_id' column
16. model.qualtrics_source.stg_qualtrics__distribution_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT, initialized to NULL. The LIMIT 0 clause ensures no rows are returned. This query is likely used as a template or placeholder in a dbt (data build tool) project, specifically for the 'model.qualtrics_source.stg_qualtrics__distribution_tmp' model.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp id _fivetran_deleted _fivetran_synced created_date header_from_email header_from_name header_reply_to_email header_subject message_library_id message_message_id message_message_text modified_date organization_id owner_id parent_distribution_id recipient_contact_id recipient_library_id recipient_mailing_list_id recipient_sample_id request_status request_type send_date survey_link_expiration_date survey_link_link_type survey_link_survey_id 41. source.qualtrics_source.qualtrics.distribution 41. source.qualtrics_source.qualtrics.distribution
Name Type Comment
id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
created_date text None
header_from_email text None
header_from_name text None
header_reply_to_email text None
header_subject text None
message_library_id integer None
message_message_id integer None
message_message_text integer None
modified_date text None
organization_id text None
owner_id text None
parent_distribution_id integer None
recipient_contact_id text None
recipient_library_id text None
recipient_mailing_list_id text None
recipient_sample_id text None
request_status text None
request_type text None
send_date text None
survey_link_expiration_date text None
survey_link_link_type text None
survey_link_survey_id text None
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution distribution_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • distribution_id: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp _fivetran_deleted 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution is_deleted 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to BOOLEAN type in the 'fields' CTE
    • Output Columns:
      • is_deleted: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp _fivetran_synced 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution _fivetran_synced 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TIMESTAMP type in the 'fields' CTE
    • Output Columns:
      • _fivetran_synced: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp created_date 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution created_at 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[created_date]
    • Cleaning The column is cast to TIMESTAMP type in both 'fields' and 'final' CTEs
    • Output Columns:
      • created_at: Mapped after casting to TIMESTAMP
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp header_from_email 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution header_from_email 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[header_from_email]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • header_from_email: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp header_from_name 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution header_from_name 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[header_from_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • header_from_name: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp header_reply_to_email 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution header_reply_to_email 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[header_reply_to_email]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • header_reply_to_email: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp header_subject 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution header_subject 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[header_subject]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • header_subject: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp message_library_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution message_library_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[message_library_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • message_library_id: Directly mapped without renaming
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp message_message_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution message_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[message_message_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • message_id: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp message_message_text 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution message_text 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[message_message_text]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • message_text: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp modified_date 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution last_modified_at 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[modified_date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then cast again in the 'final' CTE
    • Output Columns:
      • last_modified_at: Mapped with type casting and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp organization_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution organization_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[organization_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • organization_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp owner_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution owner_user_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[owner_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • owner_user_id: Directly mapped and renamed
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp parent_distribution_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution parent_distribution_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[parent_distribution_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • parent_distribution_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp recipient_contact_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution recipient_contact_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[recipient_contact_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • recipient_contact_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp recipient_library_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution recipient_library_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[recipient_library_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • recipient_library_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp recipient_mailing_list_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution recipient_mailing_list_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[recipient_mailing_list_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • recipient_mailing_list_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp recipient_sample_id 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution recipient_sample_id 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[recipient_sample_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • recipient_sample_id: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp request_status 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution request_status 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[request_status]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • request_status: Directly mapped
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp request_type 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution request_type 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[request_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • request_type: Directly mapped to this output column
Column Lineage
%3 16. model.qualtrics_source.stg_qualtrics__distribution_tmp 16. model.qualtrics_source.stg_qualtrics__distribution_tmp send_date 13. model.qualtrics_source.stg_qualtrics__distribution 13. model.qualtrics_source.stg_qualtrics__distribution send_at 16. model.qualtrics_source.stg_qualtrics__distribution_tmp:f0->13. model.qualtrics_source.stg_qualtrics__distribution:f0
13. model.qualtrics_source.stg_qualtrics__distribution
  • Input Column: 16. model.qualtrics_source.stg_qualtrics__distribution_tmp[send_date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then cast again as TIMESTAMP in the 'final' CTE
    • Output Columns:
      • send_at: Mapped to this output column after casting
17. model.qualtrics_source.stg_qualtrics__question

This SQL query performs a series of transformations on data from a temporary staging table for Qualtrics questions. It casts columns to specific data types, renames some columns, and selects a subset of columns for the final output. The query doesn't filter, deduplicate, or aggregate data, but rather focuses on cleaning and restructuring the data for downstream use.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__question_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS data_export_tag,
    CAST(NULL AS BOOLEAN) AS data_visibility_hidden,
    CAST(NULL AS BOOLEAN) AS data_visibility_private,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS INT) AS next_answer_id,
    CAST(NULL AS INT) AS next_choice_id,
    CAST(NULL AS TEXT) AS question_description,
    CAST(NULL AS TEXT) AS question_description_option,
    CAST(NULL AS TEXT) AS question_text,
    CAST(NULL AS TEXT) AS question_text_unsafe,
    CAST(NULL AS TEXT) AS question_type,
    CAST(NULL AS TEXT) AS selector,
    CAST(NULL AS TEXT) AS sub_selector,
    CAST(NULL AS TEXT) AS survey_id,
    CAST(NULL AS TEXT) AS validation_setting_force_response,
    CAST(NULL AS TEXT) AS validation_setting_force_response_type,
    CAST(NULL AS TEXT) AS validation_setting_type,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    data_export_tag,
    data_visibility_hidden AS is_data_hidden,
    data_visibility_private AS is_data_private,
    id AS question_id,
    next_answer_id,
    next_choice_id,
    question_description,
    question_description_option,
    question_text,
    question_text_unsafe,
    question_type,
    selector,
    sub_selector,
    survey_id,
    validation_setting_force_response,
    validation_setting_force_response_type,
    validation_setting_type,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question is_deleted _fivetran_synced data_export_tag is_data_hidden is_data_private question_id next_answer_id next_choice_id question_description question_description_option question_text question_text_unsafe question_type selector sub_selector survey_id validation_setting_force_response validation_setting_force_response_type validation_setting_type source_relation 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp id survey_id _fivetran_deleted _fivetran_synced data_export_tag data_visibility_hidden data_visibility_private next_answer_id next_choice_id question_description question_description_option question_text question_text_unsafe question_type selector sub_selector validation_setting_force_response validation_setting_force_response_type validation_setting_type 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f5 22. model.qualtrics_source.stg_qualtrics__question_tmp:f1->17. model.qualtrics_source.stg_qualtrics__question:f15 22. model.qualtrics_source.stg_qualtrics__question_tmp:f2->17. model.qualtrics_source.stg_qualtrics__question:f0 22. model.qualtrics_source.stg_qualtrics__question_tmp:f3->17. model.qualtrics_source.stg_qualtrics__question:f1 22. model.qualtrics_source.stg_qualtrics__question_tmp:f4->17. model.qualtrics_source.stg_qualtrics__question:f2 22. model.qualtrics_source.stg_qualtrics__question_tmp:f5->17. model.qualtrics_source.stg_qualtrics__question:f3 22. model.qualtrics_source.stg_qualtrics__question_tmp:f6->17. model.qualtrics_source.stg_qualtrics__question:f4 22. model.qualtrics_source.stg_qualtrics__question_tmp:f7->17. model.qualtrics_source.stg_qualtrics__question:f6 22. model.qualtrics_source.stg_qualtrics__question_tmp:f8->17. model.qualtrics_source.stg_qualtrics__question:f7 22. model.qualtrics_source.stg_qualtrics__question_tmp:f9->17. model.qualtrics_source.stg_qualtrics__question:f8 22. model.qualtrics_source.stg_qualtrics__question_tmp:f10->17. model.qualtrics_source.stg_qualtrics__question:f9 22. model.qualtrics_source.stg_qualtrics__question_tmp:f11->17. model.qualtrics_source.stg_qualtrics__question:f10 22. model.qualtrics_source.stg_qualtrics__question_tmp:f12->17. model.qualtrics_source.stg_qualtrics__question:f11 22. model.qualtrics_source.stg_qualtrics__question_tmp:f13->17. model.qualtrics_source.stg_qualtrics__question:f12 22. model.qualtrics_source.stg_qualtrics__question_tmp:f14->17. model.qualtrics_source.stg_qualtrics__question:f13 22. model.qualtrics_source.stg_qualtrics__question_tmp:f15->17. model.qualtrics_source.stg_qualtrics__question:f14 22. model.qualtrics_source.stg_qualtrics__question_tmp:f16->17. model.qualtrics_source.stg_qualtrics__question:f16 22. model.qualtrics_source.stg_qualtrics__question_tmp:f17->17. model.qualtrics_source.stg_qualtrics__question:f17 22. model.qualtrics_source.stg_qualtrics__question_tmp:f18->17. model.qualtrics_source.stg_qualtrics__question:f18
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
data_export_tag text The tag to identify the question in exported data.
is_data_hidden boolean Boolean that represents whether the embedded data is hidden.
is_data_private boolean Boolean that represents whether the embedded data is private.
question_id text The unique identifier for the question. Match pattern = ^QID[a-zA-Z0-9]+$
next_answer_id integer For Matrix questions, the vertical options are denoted as "Answers" in the question's structure. ID of the next answer for this question. ?
next_choice_id integer For Matrix questions, the horizontal options are denoted as "Choices" in the question's structure. ID of the next choice for this question. ?
question_description text Label to identify the question.
question_description_option text An optional user-provided field for question descriptions. Accepted values = `UseText`, `SpecifyLabel`
question_text text Text for the question.
question_text_unsafe text Un-paresed version of the question text.
question_type text The type of question. Can be - `MC`,`Matrix`,`Captcha`,`CS`,`DB`,`DD`,`Draw`,`DynamicMatrix`,`FileUpload`,`GAP`,`HeatMap`,`HL`,`HotSpot`,`Meta`,`PGR`,`RO`,`SBS`,`Slider`,`SS`,`TE`,`Timing`,`TreeSelect`
selector text How answers are selected such as single answer, multiple answer, etc. Accepted values - - `Bipolar` - `Browser` - `Captcha` - `CompactView` - `CS` - `D` - `DL` - `DND` - `DragAndDrop` - `ESTB` - `FORM` - `FileUpload` - `GRB` - `HBAR` - `HR` - `HSLIDER` - `I` - `Image` - `LikeDislike` - `Likert` - `MACOL` - `MAHR` - `MAVR` - `ML` - `MSB` - `MaxDiff` - `NPS` - `OH` - `OnOff` - `POS` - `PTB` - `PW` - `PageTimer` - `Profile` - `RB` - `RO` - `SACOL` - `SAHR` - `SAVR` - `SB` - `SBSMatrix` - `SL` - `STAR` - `ScreenCapture` - `SearchOnly` - `Signature` - `TA` - `TB` - `TBelow` - `TE` - `TL` - `TRight` - `Text` - `V1` - `V2` - `VR` - `VRTL` - `WTXB`
sub_selector text How subquestion answers are selected. Allowed values - SingleAnswer, DL, GR, DND, Long, Medium, MultipleAnswer, Columns, NoColumns, Short, TX, TXOT, WOTXB, WOTB, WTB, WTXB, WVTB.
survey_id text The unique identifier for this survey. Match pattern = ^SV_[a-zA-Z0-9]{11,15}$
validation_setting_force_response integer The response from forcing respondents to answer a question or request that they consider answering the question before leaving the page
validation_setting_force_response_type integer The type of response from forcing respondents to answer a question or request that they consider answering the question before leaving the page
validation_setting_type text The type of forced response validation that is set.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp _fivetran_deleted 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question is_deleted 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[_fivetran_deleted]
    • Cleaning The column is cast to BOOLEAN type and renamed
    • Output Columns:
      • is_deleted: Directly mapped after casting and renaming
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp _fivetran_synced 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question _fivetran_synced 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[_fivetran_synced]
    • Cleaning The column is cast to TIMESTAMP type
    • Output Columns:
      • _fivetran_synced: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp data_export_tag 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question data_export_tag 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[data_export_tag]
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • data_export_tag: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp data_visibility_hidden 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question is_data_hidden 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[data_visibility_hidden]
    • Cleaning The column is cast to BOOLEAN type and renamed
    • Output Columns:
      • is_data_hidden: Directly mapped after casting and renaming
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp data_visibility_private 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question is_data_private 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[data_visibility_private]
    • Cleaning The column is cast to BOOLEAN type and renamed
    • Output Columns:
      • is_data_private: Directly mapped after casting and renaming
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp id 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_id 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[id]
    • Cleaning The column is cast to TEXT type and renamed
    • Output Columns:
      • question_id: Directly mapped after casting and renaming
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp next_answer_id 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question next_answer_id 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[next_answer_id]
    • Cleaning The column is cast to INT type
    • Output Columns:
      • next_answer_id: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp next_choice_id 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question next_choice_id 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[next_choice_id]
    • Cleaning The column is cast to INT type
    • Output Columns:
      • next_choice_id: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_description 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_description 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_description]
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • question_description: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_description_option 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_description_option 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_description_option]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • question_description_option: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_text 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_text 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_text]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • question_text: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_text_unsafe 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_text_unsafe 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_text_unsafe]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • question_text_unsafe: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_type 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_type 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_type]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • question_type: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp selector 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question selector 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[selector]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • selector: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp sub_selector 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question sub_selector 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[sub_selector]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • sub_selector: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp survey_id 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question survey_id 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[survey_id]
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • survey_id: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp validation_setting_force_response 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question validation_setting_force_response 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[validation_setting_force_response]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • validation_setting_force_response: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp validation_setting_force_response_type 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question validation_setting_force_response_type 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[validation_setting_force_response_type]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • validation_setting_force_response_type: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp validation_setting_type 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question validation_setting_type 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[validation_setting_type]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • validation_setting_type: Directly copied to the output
18. model.qualtrics_source.stg_qualtrics__question_option

This SQL query is primarily focused on data cleaning and restructuring. It starts by selecting all columns from a temporary staging table, then defines a set of fields with specific data types and default values. The final step renames and reorganizes these fields, including renaming '_fivetran_deleted' to 'is_deleted'. The query doesn't perform any filtering, deduplication, featurization, integration, or aggregation.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__question_option_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS key,
    CAST(NULL AS TEXT) AS question_id,
    CAST(NULL AS TEXT) AS recode_value,
    CAST(NULL AS TEXT) AS survey_id,
    CAST(NULL AS TEXT) AS text,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    question_id,
    survey_id,
    key,
    recode_value,
    text,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option is_deleted _fivetran_synced key question_id recode_value survey_id text source_relation 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp key question_id survey_id _fivetran_deleted _fivetran_synced recode_value text 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f2 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f1->18. model.qualtrics_source.stg_qualtrics__question_option:f3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f2->18. model.qualtrics_source.stg_qualtrics__question_option:f5 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f3->18. model.qualtrics_source.stg_qualtrics__question_option:f0 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f4->18. model.qualtrics_source.stg_qualtrics__question_option:f1 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f5->18. model.qualtrics_source.stg_qualtrics__question_option:f4 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f6->18. model.qualtrics_source.stg_qualtrics__question_option:f6
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
key integer The key of the `QUESTION_OPTION` that was chosen.
question_id text The unique identifier for the question. Match pattern = ^QID[a-zA-Z0-9]+$
recode_value integer Recode/mapping value for the option.
survey_id text The unique identifier for this survey. Match pattern = ^SV_[a-zA-Z0-9]{11,15}$
text text Question option text.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp _fivetran_deleted 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option is_deleted 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[_fivetran_deleted]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is renamed to 'is_deleted' in the output
    • Output Columns:
      • is_deleted: Directly copied and renamed to 'is_deleted' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp _fivetran_synced 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option _fivetran_synced 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_synced: Directly copied to the output '_fivetran_synced' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp key 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option key 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[key]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • key: Directly copied to the output 'key' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp question_id 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option question_id 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[question_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • question_id: Directly copied to the output 'question_id' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp recode_value 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option recode_value 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[recode_value]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • recode_value: Directly copied to the output 'recode_value' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp survey_id 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option survey_id 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[survey_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • survey_id: Directly copied to the output 'survey_id' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp text 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option text 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[text]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • text: Directly copied to the output 'text' column
19. model.qualtrics_source.stg_qualtrics__question_option_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for further operations in a dbt (data build tool) model.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp key question_id survey_id _fivetran_deleted _fivetran_synced recode_value text 44. source.qualtrics_source.qualtrics.question_option 44. source.qualtrics_source.qualtrics.question_option
Name Type Comment
key integer None
question_id text None
survey_id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
recode_value integer None
text text None
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp key 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option key 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[key]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • key: Directly copied to the output 'key' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp question_id 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option question_id 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[question_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • question_id: Directly copied to the output 'question_id' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp survey_id 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option survey_id 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[survey_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • survey_id: Directly copied to the output 'survey_id' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp _fivetran_deleted 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option is_deleted 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[_fivetran_deleted]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is renamed to 'is_deleted' in the output
    • Output Columns:
      • is_deleted: Directly copied and renamed to 'is_deleted' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp _fivetran_synced 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option _fivetran_synced 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_synced: Directly copied to the output '_fivetran_synced' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp recode_value 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option recode_value 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[recode_value]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • recode_value: Directly copied to the output 'recode_value' column
Column Lineage
%3 19. model.qualtrics_source.stg_qualtrics__question_option_tmp 19. model.qualtrics_source.stg_qualtrics__question_option_tmp text 18. model.qualtrics_source.stg_qualtrics__question_option 18. model.qualtrics_source.stg_qualtrics__question_option text 19. model.qualtrics_source.stg_qualtrics__question_option_tmp:f0->18. model.qualtrics_source.stg_qualtrics__question_option:f0
18. model.qualtrics_source.stg_qualtrics__question_option
  • Input Column: 19. model.qualtrics_source.stg_qualtrics__question_option_tmp[text]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • text: Directly copied to the output 'text' column
20. model.qualtrics_source.stg_qualtrics__question_response

This SQL query creates a staging table for Qualtrics question responses. It starts by selecting all columns from a temporary table, then defines a set of fields with specific data types (mostly TEXT and one TIMESTAMP). The query then selects these fields in a specific order, effectively restructuring and potentially type-casting the data from the source table. The 'source_relation' field is explicitly set to an empty string.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__question_response_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _fivetran_id,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS loop_id,
    CAST(NULL AS TEXT) AS question,
    CAST(NULL AS TEXT) AS question_id,
    CAST(NULL AS TEXT) AS question_option_key,
    CAST(NULL AS TEXT) AS response_id,
    CAST(NULL AS TEXT) AS sub_question_key,
    CAST(NULL AS TEXT) AS sub_question_text,
    CAST(NULL AS TEXT) AS value,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    _fivetran_id,
    loop_id,
    question_id,
    question,
    question_option_key,
    response_id,
    sub_question_key,
    sub_question_text,
    value,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response _fivetran_id _fivetran_synced loop_id question question_id question_option_key response_id sub_question_key sub_question_text value source_relation 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp _fivetran_id _fivetran_synced loop_id question question_id question_option_key response_id sub_question_key sub_question_text value 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f1->20. model.qualtrics_source.stg_qualtrics__question_response:f1 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f2->20. model.qualtrics_source.stg_qualtrics__question_response:f2 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f3->20. model.qualtrics_source.stg_qualtrics__question_response:f3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f4->20. model.qualtrics_source.stg_qualtrics__question_response:f4 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f5->20. model.qualtrics_source.stg_qualtrics__question_response:f5 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f6->20. model.qualtrics_source.stg_qualtrics__question_response:f6 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f7->20. model.qualtrics_source.stg_qualtrics__question_response:f7 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f8->20. model.qualtrics_source.stg_qualtrics__question_response:f8 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f9->20. model.qualtrics_source.stg_qualtrics__question_response:f9
Name Type Comment
_fivetran_id text Fivetran-generated unique key hashed on `response_id`, `question_id`, `sub_question_key`, `sub_question_text` , `question_option_key` , `loop_id` and `importId`.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
loop_id integer ID of the [Loop and Merge](https://www.qualtrics.com/support/survey-platform/survey-module/block-options/loop-and-merge/) object this response is associated with.
question text Question text.
question_id text The unique identifier for the question. Match pattern = ^QID[a-zA-Z0-9]+$
question_option_key integer The key of the `QUESTION_OPTION` that was chosen.
response_id text The unique ID for the `SURVEY_RESPONSE`.
sub_question_key integer Key of the sub question.
sub_question_text integer Sub question text.
value integer Value of the question response.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp _fivetran_id 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response _fivetran_id 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[_fivetran_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_id: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp _fivetran_synced 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response _fivetran_synced 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_synced: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp loop_id 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response loop_id 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[loop_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • loop_id: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp question 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response question 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[question]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • question: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp question_id 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response question_id 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[question_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • question_id: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp question_option_key 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response question_option_key 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[question_option_key]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • question_option_key: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp response_id 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response response_id 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[response_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_id: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp sub_question_key 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response sub_question_key 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[sub_question_key]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sub_question_key: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp sub_question_text 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response sub_question_text 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[sub_question_text]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sub_question_text: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp value 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response value 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[value]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • value: Directly mapped to the output column of the same name
21. model.qualtrics_source.stg_qualtrics__question_response_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for further development or testing purposes.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp _fivetran_id _fivetran_synced loop_id question question_id question_option_key response_id sub_question_key sub_question_text value 45. source.qualtrics_source.qualtrics.question_response 45. source.qualtrics_source.qualtrics.question_response
Name Type Comment
_fivetran_id text None
_fivetran_synced timestamp without time zone None
loop_id integer None
question text None
question_id text None
question_option_key integer None
response_id text None
sub_question_key integer None
sub_question_text integer None
value integer None
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp _fivetran_id 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response _fivetran_id 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[_fivetran_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_id: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp _fivetran_synced 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response _fivetran_synced 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_synced: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp loop_id 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response loop_id 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[loop_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • loop_id: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp question 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response question 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[question]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • question: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp question_id 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response question_id 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[question_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • question_id: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp question_option_key 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response question_option_key 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[question_option_key]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • question_option_key: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp response_id 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response response_id 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[response_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_id: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp sub_question_key 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response sub_question_key 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[sub_question_key]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sub_question_key: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp sub_question_text 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response sub_question_text 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[sub_question_text]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sub_question_text: Directly mapped to the output column of the same name
Column Lineage
%3 21. model.qualtrics_source.stg_qualtrics__question_response_tmp 21. model.qualtrics_source.stg_qualtrics__question_response_tmp value 20. model.qualtrics_source.stg_qualtrics__question_response 20. model.qualtrics_source.stg_qualtrics__question_response value 21. model.qualtrics_source.stg_qualtrics__question_response_tmp:f0->20. model.qualtrics_source.stg_qualtrics__question_response:f0
20. model.qualtrics_source.stg_qualtrics__question_response
  • Input Column: 21. model.qualtrics_source.stg_qualtrics__question_response_tmp[value]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • value: Directly mapped to the output column of the same name
22. model.qualtrics_source.stg_qualtrics__question_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for further development or testing purposes.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp id survey_id _fivetran_deleted _fivetran_synced data_export_tag data_visibility_hidden data_visibility_private next_answer_id next_choice_id question_description question_description_option question_text question_text_unsafe question_type selector sub_selector validation_setting_force_response validation_setting_force_response_type validation_setting_type 43. source.qualtrics_source.qualtrics.question 43. source.qualtrics_source.qualtrics.question
Name Type Comment
id text None
survey_id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
data_export_tag text None
data_visibility_hidden boolean None
data_visibility_private boolean None
next_answer_id integer None
next_choice_id integer None
question_description text None
question_description_option text None
question_text text None
question_text_unsafe text None
question_type text None
selector text None
sub_selector text None
validation_setting_force_response integer None
validation_setting_force_response_type integer None
validation_setting_type text None
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp id 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_id 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[id]
    • Cleaning The column is cast to TEXT type and renamed
    • Output Columns:
      • question_id: Directly mapped after casting and renaming
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp survey_id 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question survey_id 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[survey_id]
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • survey_id: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp _fivetran_deleted 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question is_deleted 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[_fivetran_deleted]
    • Cleaning The column is cast to BOOLEAN type and renamed
    • Output Columns:
      • is_deleted: Directly mapped after casting and renaming
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp _fivetran_synced 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question _fivetran_synced 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[_fivetran_synced]
    • Cleaning The column is cast to TIMESTAMP type
    • Output Columns:
      • _fivetran_synced: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp data_export_tag 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question data_export_tag 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[data_export_tag]
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • data_export_tag: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp data_visibility_hidden 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question is_data_hidden 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[data_visibility_hidden]
    • Cleaning The column is cast to BOOLEAN type and renamed
    • Output Columns:
      • is_data_hidden: Directly mapped after casting and renaming
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp data_visibility_private 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question is_data_private 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[data_visibility_private]
    • Cleaning The column is cast to BOOLEAN type and renamed
    • Output Columns:
      • is_data_private: Directly mapped after casting and renaming
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp next_answer_id 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question next_answer_id 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[next_answer_id]
    • Cleaning The column is cast to INT type
    • Output Columns:
      • next_answer_id: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp next_choice_id 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question next_choice_id 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[next_choice_id]
    • Cleaning The column is cast to INT type
    • Output Columns:
      • next_choice_id: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_description 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_description 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_description]
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • question_description: Directly mapped after casting
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_description_option 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_description_option 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_description_option]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • question_description_option: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_text 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_text 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_text]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • question_text: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_text_unsafe 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_text_unsafe 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_text_unsafe]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • question_text_unsafe: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp question_type 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question question_type 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[question_type]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • question_type: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp selector 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question selector 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[selector]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • selector: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp sub_selector 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question sub_selector 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[sub_selector]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • sub_selector: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp validation_setting_force_response 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question validation_setting_force_response 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[validation_setting_force_response]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • validation_setting_force_response: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp validation_setting_force_response_type 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question validation_setting_force_response_type 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[validation_setting_force_response_type]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • validation_setting_force_response_type: Directly copied to the output
Column Lineage
%3 22. model.qualtrics_source.stg_qualtrics__question_tmp 22. model.qualtrics_source.stg_qualtrics__question_tmp validation_setting_type 17. model.qualtrics_source.stg_qualtrics__question 17. model.qualtrics_source.stg_qualtrics__question validation_setting_type 22. model.qualtrics_source.stg_qualtrics__question_tmp:f0->17. model.qualtrics_source.stg_qualtrics__question:f0
17. model.qualtrics_source.stg_qualtrics__question
  • Input Column: 22. model.qualtrics_source.stg_qualtrics__question_tmp[validation_setting_type]
    • Direct This column is directly copied without any transformation
    • Output Columns:
      • validation_setting_type: Directly copied to the output
23. model.qualtrics_source.stg_qualtrics__sub_question

This SQL query performs a basic transformation on data from a staging table. It casts several columns to specific data types, renames the '_fivetran_deleted' column to 'is_deleted', and selects a subset of columns for the final output. The query doesn't perform any filtering, deduplication, featurization, integration, or aggregation.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__sub_question_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS choice_data_export_tag,
    CAST(NULL AS TEXT) AS key,
    CAST(NULL AS TEXT) AS question_id,
    CAST(NULL AS TEXT) AS survey_id,
    CAST(NULL AS TEXT) AS text,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    choice_data_export_tag,
    key,
    question_id,
    survey_id,
    text,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question is_deleted _fivetran_synced choice_data_export_tag key question_id survey_id text source_relation 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp key question_id survey_id _fivetran_deleted _fivetran_synced choice_data_export_tag text 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f1->23. model.qualtrics_source.stg_qualtrics__sub_question:f4 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f2->23. model.qualtrics_source.stg_qualtrics__sub_question:f5 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f3->23. model.qualtrics_source.stg_qualtrics__sub_question:f0 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f4->23. model.qualtrics_source.stg_qualtrics__sub_question:f1 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f5->23. model.qualtrics_source.stg_qualtrics__sub_question:f2 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f6->23. model.qualtrics_source.stg_qualtrics__sub_question:f6
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
choice_data_export_tag integer The tag to identify the question choice in exported data.
key integer Key of the sub question.
question_id text The unique identifier for the question. Match pattern = ^QID[a-zA-Z0-9]+$
survey_id text The unique identifier for this survey. Match pattern = ^SV_[a-zA-Z0-9]{11,15}$
text text Sub question text.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp _fivetran_deleted 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question is_deleted 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[_fivetran_deleted]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN
    • Output Columns:
      • is_deleted: Renamed and mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp _fivetran_synced 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question _fivetran_synced 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • _fivetran_synced: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp choice_data_export_tag 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question choice_data_export_tag 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[choice_data_export_tag]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • choice_data_export_tag: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp key 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question key 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[key]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • key: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp question_id 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question question_id 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[question_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • question_id: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp survey_id 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question survey_id 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[survey_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • survey_id: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp text 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question text 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[text]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • text: Directly mapped after casting
24. model.qualtrics_source.stg_qualtrics__sub_question_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT, which is set to NULL. The query is limited to 0 rows, effectively producing no output. This type of query is often used as a placeholder or template in data modeling tools like dbt.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp key question_id survey_id _fivetran_deleted _fivetran_synced choice_data_export_tag text 46. source.qualtrics_source.qualtrics.sub_question 46. source.qualtrics_source.qualtrics.sub_question
Name Type Comment
key integer None
question_id text None
survey_id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
choice_data_export_tag integer None
text text None
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp key 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question key 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[key]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • key: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp question_id 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question question_id 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[question_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • question_id: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp survey_id 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question survey_id 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[survey_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • survey_id: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp _fivetran_deleted 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question is_deleted 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[_fivetran_deleted]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN
    • Output Columns:
      • is_deleted: Renamed and mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp _fivetran_synced 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question _fivetran_synced 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • _fivetran_synced: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp choice_data_export_tag 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question choice_data_export_tag 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[choice_data_export_tag]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • choice_data_export_tag: Directly mapped after casting
Column Lineage
%3 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp text 23. model.qualtrics_source.stg_qualtrics__sub_question 23. model.qualtrics_source.stg_qualtrics__sub_question text 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp:f0->23. model.qualtrics_source.stg_qualtrics__sub_question:f0
23. model.qualtrics_source.stg_qualtrics__sub_question
  • Input Column: 24. model.qualtrics_source.stg_qualtrics__sub_question_tmp[text]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • text: Directly mapped after casting
25. model.qualtrics_source.stg_qualtrics__survey

This SQL query performs a series of data transformations on the 'stg_qualtrics__survey' table. It starts by selecting all columns from a temporary table, then explicitly casts all fields to specific data types in the 'fields' CTE. Finally, it renames some columns, adjusts data types for timestamp fields, and selects all transformed columns in the 'final' CTE. The query focuses on cleaning and standardizing the data structure.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__survey_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS auto_scoring_category,
    CAST(NULL AS TEXT) AS brand_base_url,
    CAST(NULL AS TEXT) AS brand_id,
    CAST(NULL AS TEXT) AS bundle_short_name,
    CAST(NULL AS TEXT) AS composition_type,
    CAST(NULL AS TEXT) AS creator_id,
    CAST(NULL AS TEXT) AS default_scoring_category,
    CAST(NULL AS TEXT) AS division_id,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS TIMESTAMP) AS last_accessed,
    CAST(NULL AS TIMESTAMP) AS last_activated,
    CAST(NULL AS TIMESTAMP) AS last_modified,
    CAST(NULL AS TEXT) AS owner_id,
    CAST(NULL AS TEXT) AS project_category,
    CAST(NULL AS TEXT) AS project_type,
    CAST(NULL AS TEXT) AS registry_sha,
    CAST(NULL AS TEXT) AS registry_version,
    CAST(NULL AS TEXT) AS schema_version,
    CAST(NULL AS BOOLEAN) AS scoring_summary_after_questions,
    CAST(NULL AS BOOLEAN) AS scoring_summary_after_survey,
    CAST(NULL AS TEXT) AS scoring_summary_category,
    CAST(NULL AS TEXT) AS survey_name,
    CAST(NULL AS TEXT) AS survey_status,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    id AS survey_id,
    survey_name,
    survey_status,
    brand_base_url,
    brand_id,
    bundle_short_name,
    composition_type,
    auto_scoring_category,
    default_scoring_category,
    division_id,
    creator_id AS creator_user_id,
    owner_id AS owner_user_id,
    project_category,
    project_type,
    registry_sha,
    registry_version,
    schema_version,
    scoring_summary_after_questions,
    scoring_summary_after_survey,
    scoring_summary_category,
    CAST(last_accessed AS TIMESTAMP) AS last_accessed_at,
    CAST(last_activated AS TIMESTAMP) AS last_activated_at,
    CAST(last_modified AS TIMESTAMP) AS last_modified_at,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey is_deleted _fivetran_synced auto_scoring_category brand_base_url brand_id bundle_short_name composition_type creator_user_id default_scoring_category division_id survey_id last_accessed_at last_activated_at last_modified_at owner_user_id project_category project_type registry_sha registry_version schema_version scoring_summary_after_questions scoring_summary_after_survey scoring_summary_category survey_name survey_status source_relation 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp id _fivetran_deleted _fivetran_synced auto_scoring_category brand_base_url brand_id bundle_short_name composition_type creator_id default_scoring_category division_id last_accessed last_activated last_modified option_survey_name owner_id project_category project_type registry_sha registry_version schema_version scoring_summary_after_questions scoring_summary_after_survey scoring_summary_category survey_name survey_status 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f10 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f1->25. model.qualtrics_source.stg_qualtrics__survey:f0 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f2->25. model.qualtrics_source.stg_qualtrics__survey:f1 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f3->25. model.qualtrics_source.stg_qualtrics__survey:f2 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f4->25. model.qualtrics_source.stg_qualtrics__survey:f3 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f5->25. model.qualtrics_source.stg_qualtrics__survey:f4 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f6->25. model.qualtrics_source.stg_qualtrics__survey:f5 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f7->25. model.qualtrics_source.stg_qualtrics__survey:f6 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f8->25. model.qualtrics_source.stg_qualtrics__survey:f7 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f9->25. model.qualtrics_source.stg_qualtrics__survey:f8 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f10->25. model.qualtrics_source.stg_qualtrics__survey:f9 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f11->25. model.qualtrics_source.stg_qualtrics__survey:f11 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f12->25. model.qualtrics_source.stg_qualtrics__survey:f12 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f13->25. model.qualtrics_source.stg_qualtrics__survey:f13 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f14->25. model.qualtrics_source.stg_qualtrics__survey:f23 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f15->25. model.qualtrics_source.stg_qualtrics__survey:f14 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f16->25. model.qualtrics_source.stg_qualtrics__survey:f15 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f17->25. model.qualtrics_source.stg_qualtrics__survey:f16 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f18->25. model.qualtrics_source.stg_qualtrics__survey:f17 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f19->25. model.qualtrics_source.stg_qualtrics__survey:f18 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f20->25. model.qualtrics_source.stg_qualtrics__survey:f19 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f21->25. model.qualtrics_source.stg_qualtrics__survey:f20 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f22->25. model.qualtrics_source.stg_qualtrics__survey:f21 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f23->25. model.qualtrics_source.stg_qualtrics__survey:f22 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f24->25. model.qualtrics_source.stg_qualtrics__survey:f23 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f25->25. model.qualtrics_source.stg_qualtrics__survey:f24
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
auto_scoring_category integer The automated scoring category.
brand_base_url text Base url for the organization/brand.
brand_id text Unique ID of the organization/brand.
bundle_short_name integer Short name for the content bundle that the survey is from.
composition_type integer Survey composition type.
creator_user_id integer The unique identifier for a specific `USER` who created the survey.
default_scoring_category integer The default scoring category.
division_id integer The unique identifier for the Division ID. Match pattern = ^DV_[0-9a-zA-Z]{11,15}$
survey_id text The unique identifier for this survey. Match pattern = ^SV_[a-zA-Z0-9]{11,15}$
last_accessed_at timestamp without time zone The date the survey was last accessed.
last_activated_at timestamp without time zone The date the survey was last activated.
last_modified_at timestamp without time zone The point in time when the record was last modified.
owner_user_id text The unique identifier for a specific user who owns this.
project_category text Project category of the survey. Allowed values - `CORE`, `CX`, `EX`, `BX`, `PX`
project_type text Type of [Qualtrics project](https://www.qualtrics.com/support/survey-platform/my-projects/my-projects-overview/#SelectingProjectType). Match pattern = ^[a-zA-Z]+$
registry_sha integer The survey registry SHA.
registry_version integer The survey registry version.
schema_version integer Qualtrics schema version.
scoring_summary_after_questions boolean Boolean representing whether the scoring summary is after questions.
scoring_summary_after_survey boolean Boolean representing whether the scoring summary is after the survey.
scoring_summary_category integer The unique identifier for the scoring.
survey_name text Name of the survey.
survey_status text The distribution status of the survey, or a flag indicating that it's a library block Allowed values - `Inactive`, `Active`, `Pending`, `LibBlock`, `Deactive`, `Temporary`
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp _fivetran_deleted 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey is_deleted 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN in the 'fields' CTE
    • Output Columns:
      • is_deleted: Directly mapped and renamed
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp _fivetran_synced 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey _fivetran_synced 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE
    • Output Columns:
      • _fivetran_synced: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp auto_scoring_category 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey auto_scoring_category 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[auto_scoring_category]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • auto_scoring_category: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp brand_base_url 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey brand_base_url 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[brand_base_url]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • brand_base_url: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp brand_id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey brand_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[brand_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • brand_id: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp bundle_short_name 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey bundle_short_name 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[bundle_short_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • bundle_short_name: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp composition_type 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey composition_type 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[composition_type]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • composition_type: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp creator_id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey creator_user_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[creator_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • creator_user_id: Directly mapped and renamed
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp default_scoring_category 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey default_scoring_category 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[default_scoring_category]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • default_scoring_category: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp division_id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey division_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[division_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • division_id: It is directly copied to the output column 'division_id'
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey survey_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • survey_id: Directly mapped and renamed
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp last_accessed 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey last_accessed_at 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[last_accessed]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • last_accessed_at: It is cast to TIMESTAMP and renamed to 'last_accessed_at'
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp last_activated 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey last_activated_at 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[last_activated]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • last_activated_at: It is cast to TIMESTAMP and renamed to 'last_activated_at'
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp last_modified 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey last_modified_at 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[last_modified]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • last_modified_at: It is cast to TIMESTAMP and renamed to 'last_modified_at'
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp owner_id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey owner_user_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[owner_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • owner_user_id: It is directly mapped and renamed in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp project_category 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey project_category 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[project_category]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • project_category: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp project_type 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey project_type 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[project_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • project_type: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp registry_sha 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey registry_sha 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[registry_sha]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • registry_sha: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp registry_version 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey registry_version 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[registry_version]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • registry_version: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp schema_version 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey schema_version 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[schema_version]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • schema_version: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp scoring_summary_after_questions 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey scoring_summary_after_questions 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[scoring_summary_after_questions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN in the fields CTE
    • Output Columns:
      • scoring_summary_after_questions: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp scoring_summary_after_survey 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey scoring_summary_after_survey 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[scoring_summary_after_survey]
    • Direct This column is directly copied without any transformation
    • Cleaning The column is cast to BOOLEAN type in the 'fields' CTE
    • Output Columns:
      • scoring_summary_after_survey: Directly mapped to this output column
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp scoring_summary_category 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey scoring_summary_category 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[scoring_summary_category]
    • Direct This column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • scoring_summary_category: Directly mapped to this output column
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp option_survey_name survey_name 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey survey_name 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f1->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[option_survey_name]
    • Cleaning The column is cleaned by casting it to TEXT type in the 'fields' CTE
    • Output Columns:
      • survey_name: It is directly mapped to the 'survey_name' column in the output
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[survey_name]
    • Direct This column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • survey_name: Directly mapped to this output column
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp survey_status 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey survey_status 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[survey_status]
    • Direct This column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • survey_status: Directly mapped to this output column
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data

This SQL query creates a staging table for Qualtrics survey embedded data. It starts with a base CTE that selects all columns from a temporary table. Then, it defines a fields CTE that casts specific columns to appropriate data types, including setting default values. Finally, it selects and reorders these fields in the final CTE. The query essentially prepares and structures the data for further use, casting data types and providing a consistent schema.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__survey_embedded_data_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS import_id,
    CAST(NULL AS TEXT) AS key,
    CAST(NULL AS TEXT) AS response_id,
    CAST(NULL AS TEXT) AS value,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    import_id,
    key,
    response_id,
    value,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data _fivetran_synced import_id key response_id value source_relation 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp import_id key response_id value _fivetran_synced 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f1 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f1->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f2 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f2->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f3->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f4 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f4->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
Name Type Comment
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
import_id text A unique identifier to recognize this import job of embedded survey data.
key text Key of the embedded survey data element.
response_id text The unique ID for the `SURVEY_RESPONSE`.
value integer Key of the embedded survey data element.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp _fivetran_synced 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data _fivetran_synced 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP type
    • Output Columns:
      • _fivetran_synced: Directly copied after casting
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp import_id 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data import_id 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[import_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • import_id: Directly copied after casting
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp key 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data key 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[key]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • key: Directly copied after casting
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp response_id 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data response_id 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[response_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • response_id: Directly copied after casting
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp value 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data value 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[value]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • value: Directly copied after casting
27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for a staging table in a dbt (data build tool) project, specifically for Qualtrics survey embedded data.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp import_id key response_id value _fivetran_synced 48. source.qualtrics_source.qualtrics.survey_embedded_data 48. source.qualtrics_source.qualtrics.survey_embedded_data
Name Type Comment
import_id text None
key text None
response_id text None
value integer None
_fivetran_synced timestamp without time zone None
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp import_id 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data import_id 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[import_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • import_id: Directly copied after casting
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp key 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data key 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[key]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • key: Directly copied after casting
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp response_id 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data response_id 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[response_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • response_id: Directly copied after casting
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp value 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data value 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[value]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • value: Directly copied after casting
Column Lineage
%3 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp _fivetran_synced 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data 26. model.qualtrics_source.stg_qualtrics__survey_embedded_data _fivetran_synced 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp:f0->26. model.qualtrics_source.stg_qualtrics__survey_embedded_data:f0
26. model.qualtrics_source.stg_qualtrics__survey_embedded_data
  • Input Column: 27. model.qualtrics_source.stg_qualtrics__survey_embedded_data_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP type
    • Output Columns:
      • _fivetran_synced: Directly copied after casting
28. model.qualtrics_source.stg_qualtrics__survey_response

This SQL query stages data from a Qualtrics survey response source table. It performs type casting, renames some columns, and applies minor transformations such as converting the 'finished' column to a boolean and lowercasing the recipient email. The query also includes a placeholder for a source relation column.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__survey_response_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TEXT) AS distribution_channel,
    CAST(NULL AS INT) AS duration_in_seconds,
    CAST(NULL AS TIMESTAMP) AS end_date,
    CAST(NULL AS INT) AS finished,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS TEXT) AS ip_address,
    CAST(NULL AS TIMESTAMP) AS last_modified_date,
    CAST(NULL AS FLOAT) AS location_latitude,
    CAST(NULL AS FLOAT) AS location_longitude,
    CAST(NULL AS INT) AS progress,
    CAST(NULL AS TEXT) AS recipient_email,
    CAST(NULL AS TEXT) AS recipient_first_name,
    CAST(NULL AS TEXT) AS recipient_last_name,
    CAST(NULL AS TIMESTAMP) AS recorded_date,
    CAST(NULL AS TIMESTAMP) AS start_date,
    CAST(NULL AS INT) AS status,
    CAST(NULL AS TEXT) AS survey_id,
    CAST(NULL AS TEXT) AS user_language,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    distribution_channel,
    duration_in_seconds,
    CAST(end_date AS TIMESTAMP) AS finished_at,
    CAST(CASE WHEN finished = 1 THEN TRUE ELSE FALSE END AS BOOLEAN) AS is_finished,
    id AS response_id,
    ip_address,
    CAST(last_modified_date AS TIMESTAMP) AS last_modified_at,
    location_latitude,
    location_longitude,
    progress,
    LOWER(recipient_email) AS recipient_email,
    recipient_first_name,
    recipient_last_name,
    CAST(recorded_date AS TIMESTAMP) AS recorded_date,
    CAST(start_date AS TIMESTAMP) AS started_at,
    status,
    survey_id,
    user_language,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response _fivetran_synced distribution_channel duration_in_seconds finished_at is_finished response_id ip_address last_modified_at location_latitude location_longitude progress recipient_email recipient_first_name recipient_last_name recorded_date started_at status survey_id user_language source_relation 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp id _fivetran_synced distribution_channel duration_in_seconds end_date finished ip_address last_modified_date location_latitude location_longitude progress recipient_email recipient_first_name recipient_last_name recorded_date start_date status survey_id user_language 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f5 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f1->28. model.qualtrics_source.stg_qualtrics__survey_response:f0 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f2->28. model.qualtrics_source.stg_qualtrics__survey_response:f1 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f3->28. model.qualtrics_source.stg_qualtrics__survey_response:f2 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f4->28. model.qualtrics_source.stg_qualtrics__survey_response:f3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f5->28. model.qualtrics_source.stg_qualtrics__survey_response:f4 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f6->28. model.qualtrics_source.stg_qualtrics__survey_response:f6 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f7->28. model.qualtrics_source.stg_qualtrics__survey_response:f7 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f8->28. model.qualtrics_source.stg_qualtrics__survey_response:f8 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f9->28. model.qualtrics_source.stg_qualtrics__survey_response:f9 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f10->28. model.qualtrics_source.stg_qualtrics__survey_response:f10 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f11->28. model.qualtrics_source.stg_qualtrics__survey_response:f11 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f12->28. model.qualtrics_source.stg_qualtrics__survey_response:f12 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f13->28. model.qualtrics_source.stg_qualtrics__survey_response:f13 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f14->28. model.qualtrics_source.stg_qualtrics__survey_response:f14 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f15->28. model.qualtrics_source.stg_qualtrics__survey_response:f15 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f16->28. model.qualtrics_source.stg_qualtrics__survey_response:f16 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f17->28. model.qualtrics_source.stg_qualtrics__survey_response:f17 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f18->28. model.qualtrics_source.stg_qualtrics__survey_response:f18
Name Type Comment
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
distribution_channel text The method by which the survey was distributed to respondents.
duration_in_seconds integer How long it took for the respondent to finish the survey in seconds.
finished_at timestamp without time zone The point in time when the survey response was finished.
is_finished boolean Boolean (stored as int) indicating if the respondent finished and submitted the survey, the value will be 1, otherwise it will be 0.
response_id text The unique ID for the `SURVEY_RESPONSE`.
ip_address text IP address of the recipient.
last_modified_at timestamp without time zone The point in time when the record was last modified.
location_latitude integer The approximate location of the respondent at the time the survey was taken.
location_longitude integer The approximate location of the respondent at the time the survey was taken.
progress integer How far the respondent has progressed through the survey as a percentage out of 100.
recipient_email text Email of the [recipient](https://api.qualtrics.com/ZG9jOjg3NzY2OQ-getting-information-about-distributions#the-recipients-object) if they are a single recipient (not a mailing list or sample).
recipient_first_name text First name of the [recipient](https://api.qualtrics.com/ZG9jOjg3NzY2OQ-getting-information-about-distributions#the-recipients-object) if they are a single recipient (not a mailing list or sample).
recipient_last_name text Last name of the [recipient](https://api.qualtrics.com/ZG9jOjg3NzY2OQ-getting-information-about-distributions#the-recipients-object) if they are a single recipient (not a mailing list or sample).
recorded_date timestamp without time zone The point in time when the survey response was recorded.
started_at timestamp without time zone The point in time when the survey response was recorded.
status integer The type of response.
survey_id text The unique identifier for this survey. Match pattern = ^SV_[a-zA-Z0-9]{11,15}$
user_language text The language of the respondent.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp _fivetran_synced 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response _fivetran_synced 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • _fivetran_synced: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp distribution_channel 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response distribution_channel 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[distribution_channel]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • distribution_channel: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp duration_in_seconds 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response duration_in_seconds 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[duration_in_seconds]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • duration_in_seconds: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp end_date 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response finished_at 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[end_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • finished_at: Mapped after casting to TIMESTAMP
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp finished 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response is_finished 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[finished]
    • Cleaning The column is transformed into a boolean
    • Output Columns:
      • is_finished: Mapped after transformation to boolean
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp id 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response response_id 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[id]
    • Cleaning The column is cast as TEXT and renamed
    • Output Columns:
      • response_id: Directly mapped after renaming
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp ip_address 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response ip_address 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[ip_address]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • ip_address: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp last_modified_date 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response last_modified_at 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[last_modified_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • last_modified_at: Mapped after casting to TIMESTAMP
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp location_latitude 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response location_latitude 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[location_latitude]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • location_latitude: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp location_longitude 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response location_longitude 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[location_longitude]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • location_longitude: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp progress 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response progress 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[progress]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • progress: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp recipient_email 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response recipient_email 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[recipient_email]
    • Cleaning The column is cleaned by converting to lowercase
    • Output Columns:
      • recipient_email: Transformed to lowercase and mapped to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp recipient_first_name 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response recipient_first_name 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[recipient_first_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • recipient_first_name: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp recipient_last_name 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response recipient_last_name 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[recipient_last_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • recipient_last_name: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp recorded_date 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response recorded_date 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[recorded_date]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • recorded_date: Cast to TIMESTAMP and mapped to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp start_date 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response started_at 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[start_date]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • started_at: Cast to TIMESTAMP and mapped to the output with a new name
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp status 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response status 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[status]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • status: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp survey_id 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response survey_id 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[survey_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • survey_id: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp user_language 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response user_language 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[user_language]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • user_language: Directly copied to the output
29. model.qualtrics_source.stg_qualtrics__survey_response_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT, which is set to NULL. The LIMIT 0 clause ensures no rows are returned. This query appears to be used as a template or placeholder, possibly for testing or initialization purposes in a dbt (data build tool) project.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp id _fivetran_synced distribution_channel duration_in_seconds end_date finished ip_address last_modified_date location_latitude location_longitude progress recipient_email recipient_first_name recipient_last_name recorded_date start_date status survey_id user_language 49. source.qualtrics_source.qualtrics.survey_response 49. source.qualtrics_source.qualtrics.survey_response
Name Type Comment
id text None
_fivetran_synced timestamp without time zone None
distribution_channel text None
duration_in_seconds integer None
end_date text None
finished integer None
ip_address text None
last_modified_date text None
location_latitude integer None
location_longitude integer None
progress integer None
recipient_email text None
recipient_first_name text None
recipient_last_name text None
recorded_date text None
start_date text None
status integer None
survey_id text None
user_language text None
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp id 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response response_id 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[id]
    • Cleaning The column is cast as TEXT and renamed
    • Output Columns:
      • response_id: Directly mapped after renaming
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp _fivetran_synced 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response _fivetran_synced 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • _fivetran_synced: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp distribution_channel 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response distribution_channel 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[distribution_channel]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • distribution_channel: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp duration_in_seconds 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response duration_in_seconds 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[duration_in_seconds]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • duration_in_seconds: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp end_date 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response finished_at 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[end_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • finished_at: Mapped after casting to TIMESTAMP
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp finished 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response is_finished 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[finished]
    • Cleaning The column is transformed into a boolean
    • Output Columns:
      • is_finished: Mapped after transformation to boolean
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp ip_address 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response ip_address 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[ip_address]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • ip_address: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp last_modified_date 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response last_modified_at 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[last_modified_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • last_modified_at: Mapped after casting to TIMESTAMP
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp location_latitude 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response location_latitude 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[location_latitude]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • location_latitude: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp location_longitude 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response location_longitude 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[location_longitude]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • location_longitude: Directly copied
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp progress 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response progress 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[progress]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • progress: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp recipient_email 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response recipient_email 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[recipient_email]
    • Cleaning The column is cleaned by converting to lowercase
    • Output Columns:
      • recipient_email: Transformed to lowercase and mapped to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp recipient_first_name 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response recipient_first_name 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[recipient_first_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • recipient_first_name: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp recipient_last_name 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response recipient_last_name 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[recipient_last_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • recipient_last_name: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp recorded_date 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response recorded_date 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[recorded_date]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • recorded_date: Cast to TIMESTAMP and mapped to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp start_date 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response started_at 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[start_date]
    • Cleaning The column is cleaned by casting to TIMESTAMP
    • Output Columns:
      • started_at: Cast to TIMESTAMP and mapped to the output with a new name
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp status 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response status 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[status]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • status: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp survey_id 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response survey_id 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[survey_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • survey_id: Directly copied to the output
Column Lineage
%3 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp user_language 28. model.qualtrics_source.stg_qualtrics__survey_response 28. model.qualtrics_source.stg_qualtrics__survey_response user_language 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp:f0->28. model.qualtrics_source.stg_qualtrics__survey_response:f0
28. model.qualtrics_source.stg_qualtrics__survey_response
  • Input Column: 29. model.qualtrics_source.stg_qualtrics__survey_response_tmp[user_language]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • user_language: Directly copied to the output
30. model.qualtrics_source.stg_qualtrics__survey_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT, which is set to NULL. The LIMIT 0 clause ensures that no rows are returned. This type of query is often used as a placeholder or to define a schema structure without actually populating data.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp id _fivetran_deleted _fivetran_synced auto_scoring_category brand_base_url brand_id bundle_short_name composition_type creator_id default_scoring_category division_id is_active last_accessed last_activated last_modified option_active_response_set option_anonymize_response option_auto_confirm_start option_autoadvance option_autoadvance_pages option_autofocus option_available_languages option_back_button option_ballot_box_stuffing_prevention option_collect_geo_location option_confirm_start option_custom_styles option_email_thank_you option_eosredirect_url option_highlight_questions option_inactive_survey option_new_scoring option_next_button option_no_index option_page_transition option_partial_data option_partial_data_close_after option_password_protection option_previous_button option_progress_bar_display option_protect_selection_ids option_recaptcha_v_3 option_referer_check option_referer_url option_relevant_id option_relevant_idlockout_period option_response_summary option_save_and_continue option_secure_response_files option_show_export_tags option_skin option_skin_library option_skin_question_width option_skin_type option_survey_creation_date option_survey_expiration option_survey_language option_survey_meta_description option_survey_name option_survey_protection option_survey_termination option_survey_title option_validate_message owner_id project_category project_type registry_sha registry_version schema_version scoring_summary_after_questions scoring_summary_after_survey scoring_summary_category survey_name survey_status 47. source.qualtrics_source.qualtrics.survey 47. source.qualtrics_source.qualtrics.survey
Name Type Comment
id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
auto_scoring_category integer None
brand_base_url text None
brand_id text None
bundle_short_name integer None
composition_type integer None
creator_id integer None
default_scoring_category integer None
division_id integer None
is_active integer None
last_accessed timestamp without time zone None
last_activated text None
last_modified text None
option_active_response_set text None
option_anonymize_response integer None
option_auto_confirm_start integer None
option_autoadvance boolean None
option_autoadvance_pages boolean None
option_autofocus boolean None
option_available_languages integer None
option_back_button boolean None
option_ballot_box_stuffing_prevention boolean None
option_collect_geo_location integer None
option_confirm_start integer None
option_custom_styles text None
option_email_thank_you integer None
option_eosredirect_url integer None
option_highlight_questions text None
option_inactive_survey integer None
option_new_scoring integer None
option_next_button text None
option_no_index text None
option_page_transition text None
option_partial_data text None
option_partial_data_close_after integer None
option_password_protection integer None
option_previous_button text None
option_progress_bar_display text None
option_protect_selection_ids integer None
option_recaptcha_v_3 integer None
option_referer_check integer None
option_referer_url integer None
option_relevant_id integer None
option_relevant_idlockout_period integer None
option_response_summary integer None
option_save_and_continue boolean None
option_secure_response_files boolean None
option_show_export_tags integer None
option_skin text None
option_skin_library text None
option_skin_question_width integer None
option_skin_type text None
option_survey_creation_date text None
option_survey_expiration text None
option_survey_language text None
option_survey_meta_description integer None
option_survey_name integer None
option_survey_protection text None
option_survey_termination text None
option_survey_title text None
option_validate_message integer None
owner_id text None
project_category text None
project_type text None
registry_sha integer None
registry_version integer None
schema_version integer None
scoring_summary_after_questions boolean None
scoring_summary_after_survey boolean None
scoring_summary_category integer None
survey_name text None
survey_status text None
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey survey_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • survey_id: Directly mapped and renamed
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp _fivetran_deleted 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey is_deleted 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN in the 'fields' CTE
    • Output Columns:
      • is_deleted: Directly mapped and renamed
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp _fivetran_synced 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey _fivetran_synced 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE
    • Output Columns:
      • _fivetran_synced: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp auto_scoring_category 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey auto_scoring_category 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[auto_scoring_category]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • auto_scoring_category: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp brand_base_url 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey brand_base_url 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[brand_base_url]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • brand_base_url: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp brand_id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey brand_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[brand_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • brand_id: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp bundle_short_name 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey bundle_short_name 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[bundle_short_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • bundle_short_name: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp composition_type 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey composition_type 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[composition_type]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • composition_type: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp creator_id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey creator_user_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[creator_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • creator_user_id: Directly mapped and renamed
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp default_scoring_category 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey default_scoring_category 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[default_scoring_category]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • default_scoring_category: Directly mapped without renaming
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp division_id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey division_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[division_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • division_id: It is directly copied to the output column 'division_id'
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp last_accessed 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey last_accessed_at 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[last_accessed]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • last_accessed_at: It is cast to TIMESTAMP and renamed to 'last_accessed_at'
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp last_activated 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey last_activated_at 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[last_activated]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • last_activated_at: It is cast to TIMESTAMP and renamed to 'last_activated_at'
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp last_modified 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey last_modified_at 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[last_modified]
    • Cleaning The column is cleaned by casting it to TIMESTAMP data type
    • Output Columns:
      • last_modified_at: It is cast to TIMESTAMP and renamed to 'last_modified_at'
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp option_survey_name 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey survey_name 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[option_survey_name]
    • Cleaning The column is cleaned by casting it to TEXT type in the 'fields' CTE
    • Output Columns:
      • survey_name: It is directly mapped to the 'survey_name' column in the output
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp owner_id 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey owner_user_id 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[owner_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • owner_user_id: It is directly mapped and renamed in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp project_category 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey project_category 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[project_category]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • project_category: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp project_type 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey project_type 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[project_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • project_type: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp registry_sha 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey registry_sha 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[registry_sha]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • registry_sha: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp registry_version 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey registry_version 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[registry_version]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • registry_version: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp schema_version 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey schema_version 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[schema_version]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • schema_version: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp scoring_summary_after_questions 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey scoring_summary_after_questions 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[scoring_summary_after_questions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN in the fields CTE
    • Output Columns:
      • scoring_summary_after_questions: It is directly mapped in the final CTE
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp scoring_summary_after_survey 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey scoring_summary_after_survey 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[scoring_summary_after_survey]
    • Direct This column is directly copied without any transformation
    • Cleaning The column is cast to BOOLEAN type in the 'fields' CTE
    • Output Columns:
      • scoring_summary_after_survey: Directly mapped to this output column
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp scoring_summary_category 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey scoring_summary_category 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[scoring_summary_category]
    • Direct This column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • scoring_summary_category: Directly mapped to this output column
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp survey_name 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey survey_name 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[survey_name]
    • Direct This column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • survey_name: Directly mapped to this output column
Column Lineage
%3 30. model.qualtrics_source.stg_qualtrics__survey_tmp 30. model.qualtrics_source.stg_qualtrics__survey_tmp survey_status 25. model.qualtrics_source.stg_qualtrics__survey 25. model.qualtrics_source.stg_qualtrics__survey survey_status 30. model.qualtrics_source.stg_qualtrics__survey_tmp:f0->25. model.qualtrics_source.stg_qualtrics__survey:f0
25. model.qualtrics_source.stg_qualtrics__survey
  • Input Column: 30. model.qualtrics_source.stg_qualtrics__survey_tmp[survey_status]
    • Direct This column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • survey_status: Directly mapped to this output column
31. model.qualtrics_source.stg_qualtrics__survey_version

This SQL query stages data from a temporary table (stg_qualtrics__survey_version_tmp) by casting columns to specific data types, renaming some columns, and selecting a subset of columns for the final output. It primarily focuses on cleaning and structuring the data for further use.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__survey_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TIMESTAMP) AS creation_date,
    CAST(NULL AS TEXT) AS description,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS BOOLEAN) AS published,
    CAST(NULL AS TEXT) AS survey_id,
    CAST(NULL AS TEXT) AS user_id,
    CAST(NULL AS INT) AS version_number,
    CAST(NULL AS BOOLEAN) AS was_published,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    CAST(creation_date AS TIMESTAMP) AS created_at,
    description AS version_description,
    id AS version_id,
    published AS is_published,
    survey_id,
    user_id AS publisher_user_id,
    version_number,
    was_published,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version is_deleted _fivetran_synced created_at version_description version_id is_published survey_id publisher_user_id version_number was_published source_relation 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp id survey_id _fivetran_deleted _fivetran_synced creation_date description published user_id version_number was_published 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f4 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f1->31. model.qualtrics_source.stg_qualtrics__survey_version:f6 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f2->31. model.qualtrics_source.stg_qualtrics__survey_version:f0 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f3->31. model.qualtrics_source.stg_qualtrics__survey_version:f1 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f4->31. model.qualtrics_source.stg_qualtrics__survey_version:f2 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f5->31. model.qualtrics_source.stg_qualtrics__survey_version:f3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f6->31. model.qualtrics_source.stg_qualtrics__survey_version:f5 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f7->31. model.qualtrics_source.stg_qualtrics__survey_version:f7 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f8->31. model.qualtrics_source.stg_qualtrics__survey_version:f8 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f9->31. model.qualtrics_source.stg_qualtrics__survey_version:f9
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
created_at timestamp without time zone The creation date and time of the record, expressed as an ISO 8601 value.
version_description text A user-provided description of the survey version.
version_id integer The unique identifier for this survey version.
is_published boolean Boolean that, when true, publishes the version.
survey_id text The unique identifier for this survey. Match pattern = ^SV_[a-zA-Z0-9]{11,15}$
publisher_user_id text ID of `USER` who published this survey version in your org.
version_number integer The version number of this survey.
was_published boolean Boolean that is true if the survey version was published.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp _fivetran_deleted 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version is_deleted 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN in the fields CTE
    • Output Columns:
      • is_deleted: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp _fivetran_synced 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version _fivetran_synced 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TIMESTAMP in the fields CTE
    • Output Columns:
      • _fivetran_synced: Directly mapped
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp creation_date 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version created_at 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[creation_date]
    • Cleaning The column is cast as TIMESTAMP in the fields CTE and then again in the final CTE
    • Output Columns:
      • created_at: Mapped and renamed after casting
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp description 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version version_description 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[description]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • version_description: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp id 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version version_id 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • version_id: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp published 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version is_published 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[published]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN in the fields CTE
    • Output Columns:
      • is_published: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp survey_id 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version survey_id 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[survey_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • survey_id: Directly mapped
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp user_id 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version publisher_user_id 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[user_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • publisher_user_id: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp version_number 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version version_number 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[version_number]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • version_number: Directly mapped
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp was_published 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version was_published 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[was_published]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN in the fields CTE
    • Output Columns:
      • was_published: Directly mapped
32. model.qualtrics_source.stg_qualtrics__survey_version_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It doesn't perform any actual data manipulation or retrieval from the 'model.qualtrics_source.stg_qualtrics__survey_version_tmp' model. The query is likely used as a placeholder or template for generating a schema without any data.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp id survey_id _fivetran_deleted _fivetran_synced creation_date description published user_id version_number was_published 50. source.qualtrics_source.qualtrics.survey_version 50. source.qualtrics_source.qualtrics.survey_version
Name Type Comment
id integer None
survey_id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
creation_date text None
description text None
published boolean None
user_id text None
version_number integer None
was_published boolean None
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp id 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version version_id 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • version_id: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp survey_id 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version survey_id 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[survey_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • survey_id: Directly mapped
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp _fivetran_deleted 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version is_deleted 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN in the fields CTE
    • Output Columns:
      • is_deleted: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp _fivetran_synced 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version _fivetran_synced 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TIMESTAMP in the fields CTE
    • Output Columns:
      • _fivetran_synced: Directly mapped
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp creation_date 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version created_at 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[creation_date]
    • Cleaning The column is cast as TIMESTAMP in the fields CTE and then again in the final CTE
    • Output Columns:
      • created_at: Mapped and renamed after casting
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp description 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version version_description 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[description]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • version_description: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp published 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version is_published 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[published]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN in the fields CTE
    • Output Columns:
      • is_published: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp user_id 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version publisher_user_id 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[user_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT in the fields CTE
    • Output Columns:
      • publisher_user_id: Directly mapped and renamed
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp version_number 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version version_number 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[version_number]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • version_number: Directly mapped
Column Lineage
%3 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp was_published 31. model.qualtrics_source.stg_qualtrics__survey_version 31. model.qualtrics_source.stg_qualtrics__survey_version was_published 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp:f0->31. model.qualtrics_source.stg_qualtrics__survey_version:f0
31. model.qualtrics_source.stg_qualtrics__survey_version
  • Input Column: 32. model.qualtrics_source.stg_qualtrics__survey_version_tmp[was_published]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN in the fields CTE
    • Output Columns:
      • was_published: Directly mapped
33. model.qualtrics_source.stg_qualtrics__user

This SQL query performs data cleaning and transformation on the 'stg_qualtrics__user' table. It starts by casting all fields to specific data types, then renames some columns, and adjusts data types for timestamp fields. The query also renames some boolean fields for clarity (e.g., 'unsubscribed' to 'is_unsubscribed'). Finally, it selects all transformed fields into a final output.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_qualtrics_source.stg_qualtrics__user_tmp
), fields AS (
  SELECT
    CAST(NULL AS BOOLEAN) AS _fivetran_deleted,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS TIMESTAMP) AS account_creation_date,
    CAST(NULL AS TIMESTAMP) AS account_expiration_date,
    CAST(NULL AS TEXT) AS account_status,
    CAST(NULL AS TEXT) AS division_id,
    CAST(NULL AS TEXT) AS email,
    CAST(NULL AS TEXT) AS first_name,
    CAST(NULL AS TEXT) AS id,
    CAST(NULL AS TEXT) AS language,
    CAST(NULL AS TIMESTAMP) AS last_login_date,
    CAST(NULL AS TEXT) AS last_name,
    CAST(NULL AS TEXT) AS organization_id,
    CAST(NULL AS TIMESTAMP) AS password_expiration_date,
    CAST(NULL AS TIMESTAMP) AS password_last_changed_date,
    CAST(NULL AS INT) AS response_count_auditable,
    CAST(NULL AS INT) AS response_count_deleted,
    CAST(NULL AS INT) AS response_count_generated,
    CAST(NULL AS TEXT) AS time_zone,
    CAST(NULL AS BOOLEAN) AS unsubscribed,
    CAST(NULL AS TEXT) AS user_type,
    CAST(NULL AS TEXT) AS username,
    CAST('' AS TEXT) AS source_relation
  FROM base
), final AS (
  SELECT
    CAST(account_creation_date AS TIMESTAMP) AS account_created_at,
    CAST(account_expiration_date AS TIMESTAMP) AS account_expires_at,
    account_status,
    division_id,
    email,
    first_name,
    id AS user_id,
    language,
    CAST(last_login_date AS TIMESTAMP) AS last_login_at,
    last_name,
    organization_id,
    CAST(password_expiration_date AS TIMESTAMP) AS password_expires_at,
    CAST(password_last_changed_date AS TIMESTAMP) AS password_last_changed_at,
    response_count_auditable,
    response_count_deleted,
    response_count_generated,
    time_zone,
    unsubscribed AS is_unsubscribed,
    user_type,
    username,
    _fivetran_deleted AS is_deleted,
    _fivetran_synced,
    source_relation
  FROM fields
)
SELECT
  *
FROM final
%3 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user is_deleted _fivetran_synced account_created_at account_expires_at account_status division_id email first_name user_id language last_login_at last_name organization_id password_expires_at password_last_changed_at response_count_auditable response_count_deleted response_count_generated time_zone is_unsubscribed user_type username source_relation 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp id _fivetran_deleted _fivetran_synced account_creation_date account_expiration_date account_status division_id email first_name language last_login_date last_name organization_id password_expiration_date password_last_changed_date response_count_auditable response_count_deleted response_count_generated time_zone unsubscribed user_type username 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f8 34. model.qualtrics_source.stg_qualtrics__user_tmp:f1->33. model.qualtrics_source.stg_qualtrics__user:f0 34. model.qualtrics_source.stg_qualtrics__user_tmp:f2->33. model.qualtrics_source.stg_qualtrics__user:f1 34. model.qualtrics_source.stg_qualtrics__user_tmp:f3->33. model.qualtrics_source.stg_qualtrics__user:f2 34. model.qualtrics_source.stg_qualtrics__user_tmp:f4->33. model.qualtrics_source.stg_qualtrics__user:f3 34. model.qualtrics_source.stg_qualtrics__user_tmp:f5->33. model.qualtrics_source.stg_qualtrics__user:f4 34. model.qualtrics_source.stg_qualtrics__user_tmp:f6->33. model.qualtrics_source.stg_qualtrics__user:f5 34. model.qualtrics_source.stg_qualtrics__user_tmp:f7->33. model.qualtrics_source.stg_qualtrics__user:f6 34. model.qualtrics_source.stg_qualtrics__user_tmp:f8->33. model.qualtrics_source.stg_qualtrics__user:f7 34. model.qualtrics_source.stg_qualtrics__user_tmp:f9->33. model.qualtrics_source.stg_qualtrics__user:f9 34. model.qualtrics_source.stg_qualtrics__user_tmp:f10->33. model.qualtrics_source.stg_qualtrics__user:f10 34. model.qualtrics_source.stg_qualtrics__user_tmp:f11->33. model.qualtrics_source.stg_qualtrics__user:f11 34. model.qualtrics_source.stg_qualtrics__user_tmp:f12->33. model.qualtrics_source.stg_qualtrics__user:f12 34. model.qualtrics_source.stg_qualtrics__user_tmp:f13->33. model.qualtrics_source.stg_qualtrics__user:f13 34. model.qualtrics_source.stg_qualtrics__user_tmp:f14->33. model.qualtrics_source.stg_qualtrics__user:f14 34. model.qualtrics_source.stg_qualtrics__user_tmp:f15->33. model.qualtrics_source.stg_qualtrics__user:f15 34. model.qualtrics_source.stg_qualtrics__user_tmp:f16->33. model.qualtrics_source.stg_qualtrics__user:f16 34. model.qualtrics_source.stg_qualtrics__user_tmp:f17->33. model.qualtrics_source.stg_qualtrics__user:f17 34. model.qualtrics_source.stg_qualtrics__user_tmp:f18->33. model.qualtrics_source.stg_qualtrics__user:f18 34. model.qualtrics_source.stg_qualtrics__user_tmp:f19->33. model.qualtrics_source.stg_qualtrics__user:f19 34. model.qualtrics_source.stg_qualtrics__user_tmp:f20->33. model.qualtrics_source.stg_qualtrics__user:f20 34. model.qualtrics_source.stg_qualtrics__user_tmp:f21->33. model.qualtrics_source.stg_qualtrics__user:f21
Name Type Comment
is_deleted boolean Boolean representing whether the record was soft-deleted in Qualtrics.
_fivetran_synced timestamp without time zone The time when a record was last updated by Fivetran.
account_created_at timestamp without time zone The date and time that the account was created. Dates and times are expressed in ISO 8601 format.
account_expires_at timestamp without time zone The date the account expires. Dates and times are expressed in ISO 8601 format.
account_status text Either `active`, `disabled`, or `notVerified`.
division_id integer The unique identifier for the Division ID. Match pattern = ^DV_[0-9a-zA-Z]{11,15}$
email text The user's email address.
first_name text The user's first name or given name.
user_id text Unique ID of the user. Match pattern = ^((UR)|(URH))_[0-9a-zA-Z]{11,15}$
language integer The user's default language.
last_login_at timestamp without time zone The date and time the user last logged into the user interface. Dates and times are expressed in ISO 8601 format.
last_name text User's surname.
organization_id integer ID of the organization/brand this record belongs to.
password_expires_at timestamp without time zone The date the account password expires. Dates and times are expressed in ISO 8601 format.
password_last_changed_at timestamp without time zone The date the account password was last changed. Dates and times are expressed in ISO 8601 format.
response_count_auditable integer The count of auditable responses.
response_count_deleted integer The count of deleted responses.
response_count_generated integer The count of generated responses.
time_zone integer The IANA time zone setting for the user.
is_unsubscribed integer Boolean indicating if the user unsubscribed.
user_type text ID of the user type. See mappings of user types to their type IDs [here](https://api.qualtrics.com/dc2be1c61af61-user-type).
username text UI-facing username for the account.
source_relation text The schema or database this record came from if you are making use of the qualtrics_union_schemas or qualtrics_union_databases variables, respectively. Empty string if you are not using either of these variables to union together multiple Qualtrics connectors.
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp _fivetran_deleted 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user is_deleted 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN
    • Output Columns:
      • is_deleted: Directly mapped and renamed
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp _fivetran_synced 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user _fivetran_synced 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • _fivetran_synced: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp account_creation_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user account_created_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[account_creation_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • account_created_at: Mapped and renamed after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp account_expiration_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user account_expires_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[account_expiration_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • account_expires_at: Mapped and renamed after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp account_status 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user account_status 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[account_status]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • account_status: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp division_id 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user division_id 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[division_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • division_id: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp email 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user email 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[email]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • email: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp first_name 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user first_name 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[first_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • first_name: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp id 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user user_id 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • user_id: Directly mapped and renamed
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp language 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user language 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[language]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • language: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp last_login_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user last_login_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[last_login_date]
    • Cleaning The column is cast to TIMESTAMP data type
    • Output Columns:
      • last_login_at: Directly mapped after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp last_name 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user last_name 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[last_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • last_name: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp organization_id 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user organization_id 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[organization_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • organization_id: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp password_expiration_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user password_expires_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[password_expiration_date]
    • Cleaning The column is cast to TIMESTAMP data type
    • Output Columns:
      • password_expires_at: Directly mapped after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp password_last_changed_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user password_last_changed_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[password_last_changed_date]
    • Cleaning The column is cast to TIMESTAMP data type
    • Output Columns:
      • password_last_changed_at: Directly mapped after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp response_count_auditable 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user response_count_auditable 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[response_count_auditable]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_count_auditable: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp response_count_deleted 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user response_count_deleted 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[response_count_deleted]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_count_deleted: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp response_count_generated 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user response_count_generated 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[response_count_generated]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_count_generated: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp time_zone 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user time_zone 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[time_zone]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • time_zone: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp unsubscribed 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user is_unsubscribed 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[unsubscribed]
    • Cleaning The column is renamed for clarity
    • Output Columns:
      • is_unsubscribed: Directly mapped after renaming
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp user_type 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user user_type 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[user_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • user_type: It is directly mapped to the output column 'user_type'
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp username 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user username 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[username]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • username: It is directly mapped to the output column 'username'
34. model.qualtrics_source.stg_qualtrics__user_tmp

This SQL query creates an empty result set with a single column named '_dbt_source_relation' of type TEXT. It's likely used as a placeholder or template for further development or testing purposes in a dbt (data build tool) project.

Other
SQL Query
SELECT
  CAST(NULL AS TEXT) AS _dbt_source_relation
LIMIT 0
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp id _fivetran_deleted _fivetran_synced account_creation_date account_expiration_date account_status division_id email first_name language last_login_date last_name organization_id password_expiration_date password_last_changed_date response_count_auditable response_count_deleted response_count_generated time_zone unsubscribed user_type username 51. source.qualtrics_source.qualtrics.user 51. source.qualtrics_source.qualtrics.user
Name Type Comment
id text None
_fivetran_deleted boolean None
_fivetran_synced timestamp without time zone None
account_creation_date timestamp without time zone None
account_expiration_date timestamp without time zone None
account_status text None
division_id integer None
email text None
first_name text None
language integer None
last_login_date timestamp without time zone None
last_name text None
organization_id integer None
password_expiration_date timestamp without time zone None
password_last_changed_date timestamp without time zone None
response_count_auditable integer None
response_count_deleted integer None
response_count_generated integer None
time_zone integer None
unsubscribed integer None
user_type text None
username text None
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp id 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user user_id 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • user_id: Directly mapped and renamed
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp _fivetran_deleted 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user is_deleted 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[_fivetran_deleted]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as BOOLEAN
    • Output Columns:
      • is_deleted: Directly mapped and renamed
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp _fivetran_synced 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user _fivetran_synced 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • _fivetran_synced: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp account_creation_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user account_created_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[account_creation_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • account_created_at: Mapped and renamed after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp account_expiration_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user account_expires_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[account_expiration_date]
    • Cleaning The column is cast as TIMESTAMP
    • Output Columns:
      • account_expires_at: Mapped and renamed after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp account_status 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user account_status 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[account_status]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • account_status: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp division_id 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user division_id 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[division_id]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • division_id: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp email 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user email 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[email]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • email: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp first_name 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user first_name 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[first_name]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • first_name: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp language 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user language 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[language]
    • Direct The column is directly copied without transformation
    • Cleaning The column is cast as TEXT
    • Output Columns:
      • language: Directly mapped
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp last_login_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user last_login_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[last_login_date]
    • Cleaning The column is cast to TIMESTAMP data type
    • Output Columns:
      • last_login_at: Directly mapped after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp last_name 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user last_name 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[last_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • last_name: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp organization_id 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user organization_id 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[organization_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • organization_id: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp password_expiration_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user password_expires_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[password_expiration_date]
    • Cleaning The column is cast to TIMESTAMP data type
    • Output Columns:
      • password_expires_at: Directly mapped after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp password_last_changed_date 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user password_last_changed_at 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[password_last_changed_date]
    • Cleaning The column is cast to TIMESTAMP data type
    • Output Columns:
      • password_last_changed_at: Directly mapped after casting
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp response_count_auditable 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user response_count_auditable 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[response_count_auditable]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_count_auditable: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp response_count_deleted 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user response_count_deleted 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[response_count_deleted]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_count_deleted: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp response_count_generated 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user response_count_generated 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[response_count_generated]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • response_count_generated: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp time_zone 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user time_zone 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[time_zone]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • time_zone: Directly copied
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp unsubscribed 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user is_unsubscribed 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[unsubscribed]
    • Cleaning The column is renamed for clarity
    • Output Columns:
      • is_unsubscribed: Directly mapped after renaming
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp user_type 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user user_type 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[user_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • user_type: It is directly mapped to the output column 'user_type'
Column Lineage
%3 34. model.qualtrics_source.stg_qualtrics__user_tmp 34. model.qualtrics_source.stg_qualtrics__user_tmp username 33. model.qualtrics_source.stg_qualtrics__user 33. model.qualtrics_source.stg_qualtrics__user username 34. model.qualtrics_source.stg_qualtrics__user_tmp:f0->33. model.qualtrics_source.stg_qualtrics__user:f0
33. model.qualtrics_source.stg_qualtrics__user
  • Input Column: 34. model.qualtrics_source.stg_qualtrics__user_tmp[username]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT type
    • Output Columns:
      • username: It is directly mapped to the output column 'username'
35. source.qualtrics_source.qualtrics.block
The model details are not provided
36. source.qualtrics_source.qualtrics.block_question
The model details are not provided
37. source.qualtrics_source.qualtrics.contact_mailing_list_membership
The model details are not provided
38. source.qualtrics_source.qualtrics.directory
The model details are not provided
39. source.qualtrics_source.qualtrics.directory_contact
The model details are not provided
40. source.qualtrics_source.qualtrics.directory_mailing_list
The model details are not provided
41. source.qualtrics_source.qualtrics.distribution
The model details are not provided
42. source.qualtrics_source.qualtrics.distribution_contact
The model details are not provided
43. source.qualtrics_source.qualtrics.question
The model details are not provided
44. source.qualtrics_source.qualtrics.question_option
The model details are not provided
45. source.qualtrics_source.qualtrics.question_response
The model details are not provided
46. source.qualtrics_source.qualtrics.sub_question
The model details are not provided
47. source.qualtrics_source.qualtrics.survey
The model details are not provided
48. source.qualtrics_source.qualtrics.survey_embedded_data
The model details are not provided
49. source.qualtrics_source.qualtrics.survey_response
The model details are not provided
50. source.qualtrics_source.qualtrics.survey_version
The model details are not provided
51. source.qualtrics_source.qualtrics.user
The model details are not provided