Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

per Chris call repaired table biosample and the raw table biosample_raw #30

Open
turbomam opened this issue Jan 5, 2022 · 1 comment

Comments

@turbomam
Copy link
Owner

turbomam commented Jan 5, 2022

per Chris call repaired table biosample and the raw table biosample_raw

@turbomam
Copy link
Owner Author

turbomam commented Jan 6, 2022

I already violated the spirit of this issue

I added the env_package column from harmonized_wide_repaired, aliased as env_package_repaired to the view biosample_basex_merged

  1. I haven't renamed harmonized_wide_repaired -> harmonized_wide and harmonized_wide -> harmonized_wide_raw yet
  2. I created a repaired column with repaired in the column name, when we are supposed to assume that a column is repaired unless it includes raw in it's name?
    • I'd really like to leave this new column in the view as is. Otherwise, I think I'd have to list out every column (500+ and growing) I want to retrieve from harmonized_wide and programmatically assign the env_package_raw alias to harmonized_wide.env_package
CREATE VIEW biosample_basex_merged AS
SELECT
	nam.*,
	bia.bp_acc ,
	hwr.env_package as env_package_repaired,
	hw.*
FROM
	non_attribute_metadata nam
LEFT JOIN bp_id_accession bia
		using("bp_id")
LEFT JOIN harmonized_wide_repaired hwr
		using("raw_id")
LEFT JOIN harmonized_wide hw
		using("raw_id");

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

No branches or pull requests

1 participant