Last tested: Aug 13, 2020
Great news! Visualizations can now be defined in LookML!
manifest.lkml
visualization: {
id: "unique_id"
label: "MY LABEL"
url: "https://www.url.js"
sri_hash: "my_sri_hash"
file: "bundle.js"
dependencies: ["https://my_dep.js", "https://more_dep.js"]
}
id
must be unique across all visualizations on the instance (validation will show errors otherwise)d3 was referenced but never defined
Your admin vis looks something like this.
manifest.lkml
file.visualization: {
id: "test_vis"
label: "Test Vis New"
url: "https://cdn.rawgit.com/looker/visualization-api-examples/master/examples/hello_world/hello_world.js"
sri_hash: ""
dependencies: []
}
manifest.lkml
to include these constants. It should look something like this.constant: VIS_LABEL {
value: "Test Vis New"
export: override_optional
}
visualization: {
id: "hello_world"
url: "https://cdn.rawgit.com/looker/visualization-api-examples/master/examples/hello_world/hello_world.js"
label: "@{VIS_LABEL}"
dependencies: []
}
marketplace.json
file so that the Marketplace Installer knows how to present the configuration UI.{
"label": "Liquid Gauge Visualization",
"category_idl": "visualizations",
"branding": {
"image_uri": "https://wwwstatic-a.lookercdn.com/blocks/logos/aws.png",
"tagline": "Visualize a single value with a neat Liquid Gauge."
},
"constants": {
"VIS_LABEL": {
"description": "This will be shown in the UI",
"label": "Visualization Label"
}
},
}
You need the branding and label to match that of the listing in the marketplace_backend
for validation purposes.
When you eventually run the installation it should look something like this during the configuration
git://
url and the commit sha
for the version you want to publish to the marketplace.visualizations
Sample:
import { MarketplaceListing, fileURL } from "../../src/data"
import { category, byLooker } from ".."
const listing: MarketplaceListing = {
id: "liquid_gauge_test",
author: byLooker,
label: "Liquid Gauge Visualization"
branding: {
badge: null,
brand_color: null,
image_uri: "https://wwwstatic-a.lookercdn.com/blocks/logos/aws.png",
tagline: "Visualize a single value with a neat Liquid Gauge."
},
versions: [
{
looker_version: ">=6.21.0",
number: "1.0.0",
project_git_ref: "<< YOUR GIT REF >>",
project_git_uri: "<< YOUR GIT URL >>",
release_notes_md: "- Initial Marketplace Release",
released_at: "2019-06-30T00:00:00+0000"
}
],
metadata_fields: [],
hero_image_uris: [
"https://wwwstatic-a.lookercdn.com/blocks/screenshots/source/redshift_admin_by_aws/1.png"
],
documentation_uri: "https://docs.looker.com/apps/coolzone",
support_uri: "https://docs.looker.com/support/coolzone",
description_md: "This is a port of the existing Liquid Gauge custom visualization into the new Marketplace.",
category: category("visualizations"),
}
export default listing
This content is subject to limited support.