-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47a0670
commit e38cba5
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- This was a small query put together for https://sagebionetworks.jira.com/browse/SYNSD-893 | ||
-- The query is looking for files that have a different name than the entity they are associated with | ||
USE ROLE DATA_ENGINEER; | ||
USE WAREHOUSE COMPUTE_XSMALL; | ||
USE DATABASE SYNAPSE_DATA_WAREHOUSE; | ||
USE SCHEMA SYNAPSE; | ||
|
||
-- This is looking by parent_ID | ||
SELECT ENTITY_LATEST.id, ENTITY_LATEST.name, FILE_LATEST.FILE_NAME, FILE_LATEST.CONTENT_MD5 FROM synapse_data_warehouse.synapse.node_latest ENTITY_LATEST | ||
inner join | ||
synapse_data_warehouse.synapse.file_latest FILE_LATEST | ||
on | ||
ENTITY_LATEST.file_handle_id = FILE_LATEST.ID | ||
WHERE ENTITY_LATEST.PARENT_ID = 51286684 | ||
AND FILE_LATEST.FILE_NAME != ENTITY_LATEST.name |