File size: 8,733 Bytes
e71f686
 
2808a40
e74ff86
 
 
 
 
 
 
 
 
b0e7098
e74ff86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b0e7098
e74ff86
 
b5184eb
 
e74ff86
 
 
7f69413
150836e
7f69413
 
150836e
fff85c6
e74ff86
 
 
 
 
 
 
36db98a
e74ff86
 
 
 
 
 
 
 
 
2808a40
e74ff86
 
2808a40
b0e7098
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
SELECT
    id,
    name AS "Nome documento",
    COALESCE(NULLIF(data->'responseData'->0->'response'->>'city', '[null]'), 'Não especificado') AS "Cidade",
    COALESCE(NULLIF(data->'responseData'->0->'response'->>'state', '[null]'), 'Não especificado') AS "Estado",
    COALESCE(NULLIF(data->'responseData'->0->'response'->>'region', '[null]'), 'Não especificado') AS "Região",
    COALESCE(NULLIF(data->'responseData'->0->'response'->>'country', '[null]'), 'Não especificado') AS "País",
    COALESCE(NULLIF(data->'responseData'->0->'response'->>'extra_info', '[null]'), 'Não especificado') AS "Informações adicionais",
    COALESCE(NULLIF(data->'responseData'->0->'response'->>'target_or_deposit', '[null]'), 'Não especificado') AS "Alvo ou depósito",
    COALESCE(NULLIF(data->'responseData'->0->'response'->'geological_context'->>'tectonic_context', '[null]'), 'Não especificado') AS "Contexto tectônico",
    COALESCE(NULLIF(data->'responseData'->0->'response'->'geological_context'->>'geological_context', '[null]'), 'Não especificado') AS "Contexto geológico",
    COALESCE(NULLIF(data->'responseData'->0->'response'->'geological_context'->>'context_of_present_rocks', '[null]'), 'Não especificado') AS "Contexto das rochas presentes",
    
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'sedimentares'->0->>'name', '[null]'), 'Não especificado') AS "Nome sedimentares",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'sedimentares'->0->>'type', '[null]'), 'Não especificado') AS "Tipo sedimentares",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'sedimentares'->0->>'scientificName', '[null]'), 'Não especificado') AS "Nome científico sedimentares",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'sedimentares'->0->>'contact_relations', '[null]'), 'Não especificado') AS "Relações de contato sedimentares",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'metamórficas'->0->>'name', '[null]'), 'Não especificado') AS "Nome metamórficas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'metamórficas'->0->>'type', '[null]'), 'Não especificado') AS "Tipo metamórficas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'metamórficas'->0->>'scientificName', '[null]'), 'Não especificado') AS "Nome científico metamórficas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'metamórficas'->0->>'contact_relations', '[null]'), 'Não especificado') AS "Relações de contato metamórficas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'ígneas_intrusivas'->0->>'name', '[null]'), 'Não especificado') AS "Nome ígneas intrusivas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'ígneas_intrusivas'->0->>'type', '[null]'), 'Não especificado') AS "Tipo ígneas intrusivas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'ígneas_intrusivas'->0->>'scientificName', '[null]'), 'Não especificado') AS "Nome científico ígneas intrusivas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'ígneas_intrusivas'->0->>'contact_relations', '[null]'), 'Não especificado') AS "Relações de contato ígneas intrusivas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'vulcânicas_e_subvulcânicas'->0->>'name', '[null]'), 'Não especificado') AS "Nome vulcânicas e subvulcânicas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'vulcânicas_e_subvulcânicas'->0->>'type', '[null]'), 'Não especificado') AS "Tipo vulcânicas e subvulcânicas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'vulcânicas_e_subvulcânicas'->0->>'scientificName', '[null]'), 'Não especificado') AS "Nome científico vulcânicas e subvulcânicas",
    COALESCE(NULLIF(data->'responseData'->1->'response'->'rockTypes'->'vulcânicas_e_subvulcânicas'->0->>'contact_relations', '[null]'), 'Não especificado') AS "Relações de contato vulcânicas e subvulcânicas",
   
    COALESCE(NULLIF(data->'responseData'->2->'response'->>'oreType', '[null]'), 'Não especificado') AS "Tipo de minério",
    COALESCE(NULLIF(data->'responseData'->2->'response'->>'rockType', '[null]'), 'Não especificado') AS "Tipo de rocha",
	
	
    COALESCE(NULLIF((data->'responseData'->2->'response'->'host_rocks'->>'name')::text, '[null]'), 'Não especificado') AS "Nomes rochas hospedeiras",
    COALESCE(NULLIF(data->'responseData'->2->'response'->'host_rocks'->>'geologicalEnvironments', '[null]'), 'Não especificado') AS "Eventos geológicos rochas hospedeiras",
    COALESCE(NULLIF(data->'responseData'->2->'response'->'host_rocks'->>'mineralizationStructures', '[null]'), 'Não especificado') AS "Estruturas de mineralização de rochas hospedeiras",
	COALESCE(NULLIF(data->'responseData'->2->'response'->>'oreContent', '[null]'), 'Não especificado') AS "Conteúdo do minério",
	COALESCE(NULLIF(data->'responseData'->2->'response'->>'oreContentJustify', '[null]'), 'Não especificado') AS "Justificativa do conteúdo do minério",
	COALESCE(CASE WHEN data->'responseData'->2->'response'->>'wasOreContentEstimated' = 'true' THEN true WHEN data->'responseData'->2->'response'->>'wasOreContentEstimated' = 'false' THEN false ELSE NULL END, false) AS "Conteúdo do minério estimado?",
	COALESCE(NULLIF(data->'responseData'->2->'response'->>'oreConcentration', '[null]'), 'Não especificado') AS "Concentração do minério",
	COALESCE(NULLIF(data->'responseData'->2->'response'->>'oreConcentrationJustify', '[null]'), 'Não especificado') AS "Justificativa de concentração do minério",
	COALESCE(CASE WHEN data->'responseData'->2->'response'->>'wasOreConcentrationEstimated' = 'true' THEN true WHEN data->'responseData'->2->'response'->>'wasOreConcentrationEstimated' = 'false' THEN false ELSE NULL END, false) AS "Concentração do minério estimada?",
	COALESCE(NULLIF(data->'responseData'->'set_mineralization_important_data'->'response'->>'structures', '[null]'), 'Não especificado') AS "Estruturas",
	COALESCE(NULLIF(data->'responseData'->2->'response'->>'mineralFabric', '[null]'), 'Não especificado') AS "Textura mineral",
    COALESCE(NULLIF(data->'responseData'->2->'response'->>'associatedMinerals', '[null]'), 'Não especificado') AS "Minerais associados",
    COALESCE(NULLIF(data->'responseData'->2->'response'->>'fluidInclusionsAnalysis', '[null]'), 'Não especificado') AS "Análise de inclusões fluidas",
    COALESCE(NULLIF(data->'responseData'->2->'response'->'hydrotermal_alterations'->>'alterationTypes', '[null]'), 'Não especificado') AS "Tipos de alterações hidrotermais",
    COALESCE(NULLIF(data->'responseData'->2->'response'->'hydrotermal_alterations'->>'associatedMinerals', '[null]'), 'Não especificado') AS "Minerais associados a alterações hidrotermais",
    COALESCE(NULLIF(data->'responseData'->2->'response'->>'mineralizationSignatures', '[null]'), 'Não especificado') AS "Assinaturas de mineralização",
   
   	COALESCE(NULLIF(data->'responseData'->3->'response'->>'structural_mapping', '[null]'), 'Não especificado') AS "Mapeamento estrutural",
    COALESCE(NULLIF(data->'responseData'->4->'response'->>'structureMineralizationRelation', '[null]'), 'Não especificado') AS "Relação estrutura-mineralização",
    COALESCE(NULLIF(data->'responseData'->5->'response'->>'stableIsotopes', '[null]'), 'Não especificado') AS "Isótopos estáveis",
    COALESCE(NULLIF(data->'responseData'->5->'response'->>'traceElementsAndRareEarths', '[null]'), 'Não especificado') AS "Elementos traço e terras raras",
    COALESCE(NULLIF(data->'responseData'->6->'response'->>'geophysicalSignatures', '[null]'), 'Não especificado') AS "Assinaturas geofísicas",
    COALESCE(NULLIF(data->'responseData'->6->'response'->>'mineralizationSignatures', '[null]'), 'Não especificado') AS "Assinaturas de mineralização geofísica",
    COALESCE(NULLIF(data->'responseData'->7->'response'->>'additionalInformation', '[null]'), 'Não especificado') AS "Informações adicionais de mineralização",
    COALESCE(NULLIF(data->'responseData'->8->'response'->>'estimates', '[null]'), 'Não especificado') AS "Estimativas de minério",
    COALESCE(NULLIF(data->'responseData'->9->'response'->>'potential', '[null]'), 'Não especificado') AS "Potencial de descoberta",

	COALESCE(NULLIF(data->'responseData'->11->'response'->>'explanation', '[null]'), 'Não especificado') AS "Explicação da favorabilidade",
	COALESCE(NULLIF(data->'responseData'->11->'response'->>'favorability', '[null]'), 'Não especificado') AS "Favorabilidade"
	
FROM 
    public."Extraction";