Add GeoParquet link to Data Catalog (#16453)

pull/16443/merge
Ivan Moreno 1 year ago committed by GitHub
parent 9518ec6917
commit 0af73ea493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,6 +5,7 @@ Development
- None yet - None yet
### Features ### Features
* Display GeoParquet link in Catalog [16453](https://github.com/CartoDB/cartodb/pull/16453)
* Display notifications about the new CARTO platform release [16352](https://github.com/CartoDB/cartodb/pull/16352) * Display notifications about the new CARTO platform release [16352](https://github.com/CartoDB/cartodb/pull/16352)
* Upgrade to deck.gl 8.5.6 [16338](https://github.com/CartoDB/cartodb/pull/16338) * Upgrade to deck.gl 8.5.6 [16338](https://github.com/CartoDB/cartodb/pull/16338)
* Update DO Catalog dependencies and some changes to use bundle on CARTO Workspace [#16325](https://github.com/CartoDB/cartodb/pull/16325) * Update DO Catalog dependencies and some changes to use bundle on CARTO Workspace [#16325](https://github.com/CartoDB/cartodb/pull/16325)

@ -101,6 +101,17 @@
</router-link> </router-link>
</p> </p>
</li> </li>
<li
class="u-mb--32 u-mb--12--tablet"
v-if="hasGeoparquetAvailable"
>
<h4 class="text is-small is-txtSoftGrey u-mb--10">
GeoParquet
</h4>
<p class="text is-caption">
<a class="underline" :href="geoparquetUrl" target="_blank">Download</a>
</p>
</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -112,6 +123,7 @@ import { temporalAggregationName } from 'new-dashboard/utils/catalog/temporal-ag
import { geometryTypeName } from 'new-dashboard/utils/catalog/geometry-type-name'; import { geometryTypeName } from 'new-dashboard/utils/catalog/geometry-type-name';
import { updateFrequencyName } from 'new-dashboard/utils/catalog/update-frequency-name'; import { updateFrequencyName } from 'new-dashboard/utils/catalog/update-frequency-name';
import { sendCustomDimensions } from 'new-dashboard/utils/catalog/custom-dimensions-ga'; import { sendCustomDimensions } from 'new-dashboard/utils/catalog/custom-dimensions-ga';
import { checkGeoparquetBucket } from 'new-dashboard/utils/catalog/geoparquet';
import CatalogMapPreview from 'new-dashboard/components/Catalog/CatalogMapPreview'; import CatalogMapPreview from 'new-dashboard/components/Catalog/CatalogMapPreview';
export default { export default {
@ -119,6 +131,12 @@ export default {
components: { components: {
CatalogMapPreview CatalogMapPreview
}, },
data () {
return {
hasGeoparquetAvailable: false,
geoparquetUrl: undefined
};
},
watch: { watch: {
dataset: { dataset: {
handler (value) { handler (value) {
@ -169,10 +187,16 @@ export default {
id: this.$route.params.entity_id, id: this.$route.params.entity_id,
type: this.$route.params.entity_type type: this.$route.params.entity_type
}); });
},
async checkIfGeoparquetBucketExists () {
const { ok, url } = await checkGeoparquetBucket(this.$route.params.entity_id);
this.hasGeoparquetAvailable = ok;
this.geoparquetUrl = url;
} }
}, },
mounted () { mounted () {
this.fetchKeyVariables(); this.fetchKeyVariables();
this.checkIfGeoparquetBucketExists();
} }
}; };
</script> </script>

@ -0,0 +1,9 @@
export async function checkGeoparquetBucket (dataset) {
try {
const url = `https://storage.googleapis.com/geoparquet/carto/${dataset}.parquet`;
const response = await fetch(url, { method: 'HEAD' });
return { ok: response.ok, url };
} catch (e) {
return { ok: false };
}
}

@ -1,6 +1,6 @@
{ {
"name": "cartodb-ui", "name": "cartodb-ui",
"version": "1.0.0-assets.290", "version": "1.0.0-assets.291",
"description": "CARTO UI frontend", "description": "CARTO UI frontend",
"repository": { "repository": {
"type": "git", "type": "git",

@ -1 +1,3 @@
github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== |1|ueDZd5nj+jew6gJuR6J043fBwRc=|+HaH18kuYx21mjgs1Uz/SWRhQEY= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
|1|0RrLFzimw+0ZVQNhDVHeUHbG1xk=|MdpZry4/IdRdz3jpEKPAPiDEWmA= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
|1|IU85mbarZxbwrbxBhbXKiI7hSuw=|FXKLY4UBpBGMLAB0WDDeijtQ7u0= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=

Loading…
Cancel
Save