dg:Funções de ingestão: mudanças entre as edições

De Documentação
(Criou página com 'SQL Schema <code>ingest</code>. <table> <tr><td> Function / Description / Example </td></tr> <tr> <td> <b><code>any_load(</code></b><i>text, text, text, text, bigint, text, ARRAY, integer, text, boolean</i><b><code>)</code> → </b> <i>text</i> <p class="pgdoc_comment">Load (into ingest.feature_asis) shapefile or any other non-GeoJSON, of a separated table.</p> </td> </tr><tr> <td> <b><code>any_load(</code></b><i>text, text, text, text, text, text, ARRAY, integer, tex...')
 
mSem resumo de edição
 
(5 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
*Texto original: https://github.com/digital-guard/preserv/blob/main/docs/pt/man-ingestFunctions.md
SQL Schema <code>ingest</code>.
SQL Schema <code>ingest</code>.


<table>
{| class="wikitable"
<tr><td> Function / Description / Example </td></tr>
!Function / Description / Example
<tr>
|-
<td>
|
<b><code>any_load(</code></b><i>text, text, text, text, bigint, text, ARRAY, integer, text, boolean</i><b><code>)</code> → </b> <i>text</i>
<code>'''any_load('''</code>''text, text, text, text, bigint, text, ARRAY, integer, text, boolean''<code>''')'''</code> → ''text''<br>Load (into ingest.feature_asis) shapefile or any other non-GeoJSON, of a separated table.   
<p class="pgdoc_comment">Load (into ingest.feature_asis) shapefile or any other non-GeoJSON, of a separated table.</p>  
 
</td>
|-
</tr><tr>
|
<td>
<code>'''any_load('''</code>''text, text, text, text, text, text, ARRAY, integer, text, boolean''<code>''')'''</code> → ''text''<br>Wrap to ingest.any_load(1,2,3,4=real) using string format DD_DD.   
<b><code>any_load(</code></b><i>text, text, text, text, text, text, ARRAY, integer, text, boolean</i><b><code>)</code> → </b> <i>text</i>
 
<p class="pgdoc_comment">Wrap to ingest.any_load(1,2,3,4=real) using string format DD_DD.</p>  
|-
</td>
|
</tr><tr>
<code>'''any_load_debug('''</code>''''text, text, text, text, text, text, ARRAY, text, boolean''<code>''')'''</code> → ''jsonb''
<td>
 
<b><code>any_load_debug(</code></b><i>text, text, text, text, text, text, ARRAY, text, boolean</i><b><code>)</code> → </b> <i>jsonb</i>
|-
</td>
|
</tr><tr>
<code>'''donated_packcomponent_distribution_prefixes('''</code>''integer''<code>''')'''</code> → ''_text''
<td>
 
<b><code>donated_packcomponent_distribution_prefixes(</code></b><i>integer</i><b><code>)</code> → </b> <i>_text</i>
|-
</td>
|
</tr><tr>
<code>'''donated_packcomponent_geomtype('''</code>''bigint''<code>''')'''</code> → ''_text''<br>[Geomtype,ftname,class_ftname,shortname_pt] of a layer_file.
<td>
 
<b><code>donated_packcomponent_geomtype(</code></b><i>bigint</i><b><code>)</code> → </b> <i>_text</i>
|-
<p class="pgdoc_comment">[Geomtype,ftname,class_ftname,shortname_pt] of a layer_file.</p> 
|
</td>
<code>'''fdw_csv_paths('''</code>''text, text, text''<code>''')'''</code> → ''_text''
</tr><tr>
 
<td>
|-
<b><code>fdw_csv_paths(</code></b><i>text, text, text</i><b><code>)</code> → </b> <i>_text</i>
|
</td>
<code>'''fdw_generate('''</code>''text, text, text, ARRAY, boolean, text, text, boolean''<code>''')'''</code> → ''text''<br>Generates a structure FOREIGN TABLE for ingestion.   
</tr><tr>
 
<td>
|-
<b><code>fdw_generate(</code></b><i>text, text, text, ARRAY, boolean, text, text, boolean</i><b><code>)</code> → </b> <i>text</i>
|
<p class="pgdoc_comment">Generates a structure FOREIGN TABLE for ingestion.</p>  
<code>'''fdw_generate_direct_csv('''</code>''text, text, text, boolean, boolean''<code>''')'''</code> → ''text''<br>Generates a FOREIGN TABLE for simples and direct CSV ingestion.   
</td>
 
</tr><tr>
|-
<td>
|
<b><code>fdw_generate_direct_csv(</code></b><i>text, text, text, boolean, boolean</i><b><code>)</code> → </b> <i>text</i>
<code>'''fdw_generate_getclone('''</code>''text, text, text, ARRAY, ARRAY, text''<code>''')'''</code> → ''text''<br>Generates a clone-structure FOREIGN TABLE for ingestion. Wrap for fdw_generate().   
<p class="pgdoc_comment">Generates a FOREIGN TABLE for simples and direct CSV ingestion.</p>  
 
</td>
|-
</tr><tr>
|
<td>
<code>'''fdw_generate_getcsv('''</code>''text, text, text, text''<code>''')'''</code> → ''text''
<b><code>fdw_generate_getclone(</code></b><i>text, text, text, ARRAY, ARRAY, text</i><b><code>)</code> → </b> <i>text</i>
 
<p class="pgdoc_comment">Generates a clone-structure FOREIGN TABLE for ingestion. Wrap for fdw_generate().</p>  
|-
</td>
|
</tr><tr>
<code>'''feature_asis_assign('''</code>''bigint''<code>''')'''</code> →  ''jsonb''
<td>
 
<b><code>fdw_generate_getcsv(</code></b><i>text, text, text, text</i><b><code>)</code> → </b> <i>text</i>
|-
</td>
|
</tr><tr>
<code>'''feature_asis_assign_format('''</code>''bigint, text, text, text''<code>''')'''</code> → ''text''
<td>
 
<b><code>feature_asis_assign(</code></b><i>bigint</i><b><code>)</code> → </b> <i>jsonb</i>
|-
</td>
|
</tr><tr>
<code>'''feature_asis_assign_signature('''</code>''bigint''<code>''')'''</code> →  ''jsonb''
<td>
 
<b><code>feature_asis_assign_format(</code></b><i>bigint, text, text, text</i><b><code>)</code> → </b> <i>text</i>
|-
</td>
|
</tr><tr>
<code>'''feature_asis_assign_volume('''</code>''bigint, boolean''<code>''')'''</code> → ''jsonb''
<td>
 
<b><code>feature_asis_assign_signature(</code></b><i>bigint</i><b><code>)</code> → </b> <i>jsonb</i>
|-
</td>
|
</tr><tr>
<code>'''feature_asis_export('''</code>''bigint, text, integer, jsonb, USER-DEFINED''<code>''')'''</code> →  ''record''
<td>
 
<b><code>feature_asis_assign_volume(</code></b><i>bigint, boolean</i><b><code>)</code> → </b> <i>jsonb</i>
|-
</td>
|
</tr><tr>
<code>'''feature_asis_geohashes('''</code>''bigint, integer''<code>''')'''</code> →  ''jsonb''
<td>
 
<b><code>feature_asis_export(</code></b><i>bigint, text, integer, jsonb, USER-DEFINED</i><b><code>)</code> → </b> <i>record</i>
|-
</td>
|
</tr><tr>
<code>'''feature_asis_similarity('''</code>''bigint, USER-DEFINED, ARRAY''<code>''')'''</code> → ''jsonb''
<td>
 
<b><code>feature_asis_geohashes(</code></b><i>bigint, integer</i><b><code>)</code> → </b> <i>jsonb</i>
|-
</td>
|
</tr><tr>
<code>'''geojson_load('''</code>''text, integer, real, text, text, boolean''<code>''')'''</code> → ''text''
<td>
 
<b><code>feature_asis_similarity(</code></b><i>bigint, USER-DEFINED, ARRAY</i><b><code>)</code> → </b> <i>jsonb</i>
|-
</td>
|
</tr><tr>
<code>'''getmeta_to_file('''</code>''text, integer, bigint, text, integer, text''<code>''')'''</code> →  ''int8''<br>Reads file metadata and inserts it into ingest.donated_PackComponent. If proc_step=1 returns valid ID else NULL.
<td>
 
<b><code>geojson_load(</code></b><i>text, integer, real, text, text, boolean</i><b><code>)</code> → </b> <i>text</i>
|-
</td>
|
</tr><tr>
<code>'''getmeta_to_file('''</code>''text, integer, bigint''<code>''')'''</code> → ''int8''<br>Reads file metadata and return id if exists in ingest.donated_PackComponent. 
<td>
 
<b><code>getmeta_to_file(</code></b><i>text, integer, bigint, text, integer, text</i><b><code>)</code> → </b> <i>int8</i>
|-
<p class="pgdoc_comment">Reads file metadata and inserts it into ingest.donated_PackComponent. If proc_step=1 returns valid ID else NULL.</p>
|
</td>
<code>'''getmeta_to_file('''</code>''text, text, bigint''<code>''')'''</code> → ''int8''<br>Wrap para ingest.getmeta_to_file(text,int,bigint) usando ftName ao invés de ftID. 
</tr><tr>
 
<td>
|-
<b><code>getmeta_to_file(</code></b><i>text, integer, bigint</i><b><code>)</code> → </b> <i>int8</i>
|
<p class="pgdoc_comment">Reads file metadata and return id if exists in ingest.donated_PackComponent.</p>
<code>'''getmeta_to_file('''</code>''text, text, bigint, text, integer, text''<code>''')'''</code> → ''int8''<br>Wrap para ingest.getmeta_to_file() usando ftName ao invés de ftID. 
</td>
 
</tr><tr>
|-
<td>
|
<b><code>getmeta_to_file(</code></b><i>text, text, bigint</i><b><code>)</code> → </b> <i>int8</i>
<code>'''insert_bytesize('''</code>''jsonb''<code>''')'''</code> →  ''jsonb''
<p class="pgdoc_comment">Wrap para ingest.getmeta_to_file(text,int,bigint) usando ftName ao invés de ftID.</p>   
 
</td>
|-
</tr><tr>
|
<td>
<code>'''join('''</code>''text, text, text, text, text, text''<code>''')'''</code> → ''text''<br>Join layer and cadlayer. 
<b><code>getmeta_to_file(</code></b><i>text, text, bigint, text, integer, text</i><b><code>)</code> → </b> <i>int8</i>
 
<p class="pgdoc_comment">Wrap para ingest.getmeta_to_file() usando ftName ao invés de ftID.</p>   
|-
</td>
|
</tr><tr>
<code>'''jplanet_inserts_and_drops'''</code>(smallint, boolean''<code>''')'''</code> →  ''void''
<td>
 
<b><code>insert_bytesize(</code></b><i>jsonb</i><b><code>)</code> → </b> <i>jsonb</i>
|-
</td>
|
</tr><tr>
<code>'''jsonb_mustache_prepare('''</code>''jsonb, text''<code>''')'''</code> → ''jsonb''
<td>
 
<b><code>join(</code></b><i>text, text, text, text, text, text</i><b><code>)</code> → </b> <i>text</i>
|-
<p class="pgdoc_comment">Join layer and cadlayer.</p>
|
</td>
<code>'''lix_generate_make_conf_with_license('''</code>''text, text''<code>''')'''</code> →  ''text''
</tr><tr>
 
<td>
|-
<b><code>jplanet_inserts_and_drops(</code></b><i>smallint, boolean</i><b><code>)</code> → </b> <i>void</i>
|
</td>
<code>'''lix_generate_make_conf_with_size('''</code>''text, text''<code>''')'''</code> →  ''text''
</tr><tr>
 
<td>
|-
<b><code>jsonb_mustache_prepare(</code></b><i>jsonb, text</i><b><code>)</code> → </b> <i>jsonb</i>
|
</td>
<code>'''lix_generate_makefile('''</code>''text, text''<code>''')'''</code> → ''text''
</tr><tr>
 
<td>
|-
<b><code>lix_generate_make_conf_with_license(</code></b><i>text, text</i><b><code>)</code> → </b> <i>text</i>
|
</td>
<code>'''lix_generate_readme('''</code>''text, text''<code>''')'''</code> →  ''text''
</tr><tr>
 
<td>
|-
<b><code>lix_generate_make_conf_with_size(</code></b><i>text, text</i><b><code>)</code> → </b> <i>text</i>
|
</td>
<code>'''lix_insert('''</code>''text''<code>''')'''</code> →  ''void''
</tr><tr>
 
<td>
|-
<b><code>lix_generate_makefile(</code></b><i>text, text</i><b><code>)</code> → </b> <i>text</i>
|
</td>
<code>'''load_codec_type('''</code>''text, text, text''<code>''')'''</code> → ''text''<br>Load codec_type.csv. 
</tr><tr>
 
<td>
|-
<b><code>lix_generate_readme(</code></b><i>text, text</i><b><code>)</code> → </b> <i>text</i>
|
</td>
<code>'''load_hcode_parameters('''</code>''text, text, text''<code>''')'''</code> ''text''<br>Load hcode_parameters.csv. 
</tr><tr>
 
<td>
|-
<b><code>lix_insert(</code></b><i>text</i><b><code>)</code> → </b> <i>void</i>
|
</td>
<code>'''osm_load('''</code>''text, text, text, bigint, text, ARRAY, integer, text, boolean''<code>''')'''</code> → ''text''
</tr><tr>
 
<td>
|-
<b><code>load_codec_type(</code></b><i>text, text, text</i><b><code>)</code> → </b> <i>text</i>
|
<p class="pgdoc_comment">Load codec_type.csv.</p> 
<code>'''osm_load('''</code>''text, text, text, text, text, ARRAY, integer, text, boolean''<code>''')'''</code> ''text''<br>Wrap to ingest.osm_load(1,2,3,4=real) using string format DD_DD. 
</td>
 
</tr><tr>
|-
<td>
|
<b><code>load_hcode_parameters(</code></b><i>text, text, text</i><b><code>)</code> → </b> <i>text</i>
<code>'''package_layers_summary('''</code>''real, text, text''<code>''')'''</code> →  ''xml''
<p class="pgdoc_comment">Load hcode_parameters.csv.</p> 
 
</td>
|-
</tr><tr>
|
<td>
<code>'''publicating_geojsons('''</code>''bigint, text, text''<code>''')'''</code> →  ''text''
<b><code>osm_load(</code></b><i>text, text, text, bigint, text, ARRAY, integer, text, boolean</i><b><code>)</code> → </b> <i>text</i>
 
</td>
|-
</tr><tr>
|
<td>
<code>'''publicating_geojsons('''</code>''text, text, text''<code>''')'''</code> → ''text''<br>Wrap to ingest.publicating_geojsons.
<b><code>osm_load(</code></b><i>text, text, text, text, text, ARRAY, integer, text, boolean</i><b><code>)</code> → </b> <i>text</i>
 
<p class="pgdoc_comment">Wrap to ingest.osm_load(1,2,3,4=real) using string format DD_DD.</p> 
|-
</td>
|
</tr><tr>
<code>'''publicating_geojsons_p1('''</code>''bigint, text''<code>''')'''</code> →  ''text''
<td>
 
<b><code>package_layers_summary(</code></b><i>real, text, text</i><b><code>)</code> → </b> <i>xml</i>
|-
</td>
|
</tr><tr>
<code>'''publicating_geojsons_p2('''</code>''bigint, text, boolean''<code>''')'''</code> → ''text''
<td>
 
<b><code>publicating_geojsons(</code></b><i>bigint, text, text</i><b><code>)</code> → </b> <i>text</i>
|-
</td>
|
</tr><tr>
<code>'''publicating_geojsons_p3('''</code>''bigint, text, text''<code>''')'''</code> →  ''text''
<td>
 
<b><code>publicating_geojsons(</code></b><i>text, text, text</i><b><code>)</code> → </b> <i>text</i>
|-
<p class="pgdoc_comment">Wrap to ingest.publicating_geojsons</p> 
|
</td>
<code>'''publicating_geojsons_p4('''</code>''bigint, text, text''<code>''')'''</code> → ''text''
</tr><tr>
 
<td>
|-
<b><code>publicating_geojsons_p1(</code></b><i>bigint, text</i><b><code>)</code> → </b> <i>text</i>
|
</td>
<code>'''qgis_vwadmin_feature_asis('''</code>''text''<code>''')'''</code> →  ''text''
</tr><tr>
 
<td>
|}
<b><code>publicating_geojsons_p2(</code></b><i>bigint, text, boolean</i><b><code>)</code> → </b> <i>text</i>
 
</td>
[[Categoria:Digital-guard]]
</tr><tr>
<td>
<b><code>publicating_geojsons_p3(</code></b><i>bigint, text, text</i><b><code>)</code> → </b> <i>text</i>
</td>
</tr><tr>
<td>
<b><code>publicating_geojsons_p4(</code></b><i>bigint, text, text</i><b><code>)</code> → </b> <i>text</i>
</td>
</tr><tr>
<td>
<b><code>qgis_vwadmin_feature_asis(</code></b><i>text</i><b><code>)</code> → </b> <i>text</i>
</td>
</tr>
</table>

Edição atual tal como às 16h54min de 3 de maio de 2023

SQL Schema ingest.

Function / Description / Example

any_load(text, text, text, text, bigint, text, ARRAY, integer, text, boolean)text
Load (into ingest.feature_asis) shapefile or any other non-GeoJSON, of a separated table.

any_load(text, text, text, text, text, text, ARRAY, integer, text, boolean)text
Wrap to ingest.any_load(1,2,3,4=real) using string format DD_DD.

'any_load_debug('text, text, text, text, text, text, ARRAY, text, boolean)jsonb

donated_packcomponent_distribution_prefixes(integer)_text

donated_packcomponent_geomtype(bigint)_text
[Geomtype,ftname,class_ftname,shortname_pt] of a layer_file.

fdw_csv_paths(text, text, text)_text

fdw_generate(text, text, text, ARRAY, boolean, text, text, boolean)text
Generates a structure FOREIGN TABLE for ingestion.

fdw_generate_direct_csv(text, text, text, boolean, boolean)text
Generates a FOREIGN TABLE for simples and direct CSV ingestion.

fdw_generate_getclone(text, text, text, ARRAY, ARRAY, text)text
Generates a clone-structure FOREIGN TABLE for ingestion. Wrap for fdw_generate().

fdw_generate_getcsv(text, text, text, text)text

feature_asis_assign(bigint)jsonb

feature_asis_assign_format(bigint, text, text, text)text

feature_asis_assign_signature(bigint)jsonb

feature_asis_assign_volume(bigint, boolean)jsonb

feature_asis_export(bigint, text, integer, jsonb, USER-DEFINED)record

feature_asis_geohashes(bigint, integer)jsonb

feature_asis_similarity(bigint, USER-DEFINED, ARRAY)jsonb

geojson_load(text, integer, real, text, text, boolean)text

getmeta_to_file(text, integer, bigint, text, integer, text)int8
Reads file metadata and inserts it into ingest.donated_PackComponent. If proc_step=1 returns valid ID else NULL.

getmeta_to_file(text, integer, bigint)int8
Reads file metadata and return id if exists in ingest.donated_PackComponent.

getmeta_to_file(text, text, bigint)int8
Wrap para ingest.getmeta_to_file(text,int,bigint) usando ftName ao invés de ftID.

getmeta_to_file(text, text, bigint, text, integer, text)int8
Wrap para ingest.getmeta_to_file() usando ftName ao invés de ftID.

insert_bytesize(jsonb)jsonb

join(text, text, text, text, text, text)text
Join layer and cadlayer.

jplanet_inserts_and_drops(smallint, boolean)void

jsonb_mustache_prepare(jsonb, text)jsonb

lix_generate_make_conf_with_license(text, text)text

lix_generate_make_conf_with_size(text, text)text

lix_generate_makefile(text, text)text

lix_generate_readme(text, text)text

lix_insert(text)void

load_codec_type(text, text, text)text
Load codec_type.csv.

load_hcode_parameters(text, text, text)text
Load hcode_parameters.csv.

osm_load(text, text, text, bigint, text, ARRAY, integer, text, boolean)text

osm_load(text, text, text, text, text, ARRAY, integer, text, boolean)text
Wrap to ingest.osm_load(1,2,3,4=real) using string format DD_DD.

package_layers_summary(real, text, text)xml

publicating_geojsons(bigint, text, text)text

publicating_geojsons(text, text, text)text
Wrap to ingest.publicating_geojsons.

publicating_geojsons_p1(bigint, text)text

publicating_geojsons_p2(bigint, text, boolean)text

publicating_geojsons_p3(bigint, text, text)text

publicating_geojsons_p4(bigint, text, text)text

qgis_vwadmin_feature_asis(text)text