I created a custom transform model for analytics. ...
# announcements
m
I created a custom transform model for analytics. However, after extraction, explore button is still not available
d
m
Yes, I add a model into the model directory.
The file is
risk_area.m5o
file contains following information
Copy code
{
  version = 1
  sql_table_name = tap_covid_19.risk_area
  name = risk_area
  columns {
    country {
      primary_key = true
      hidden = true
      type = string
      sql = "{{table}}.account_id"
    }
    country {
      label = Country
      description = Country
      type = string
      sql = "{{table}}.country"
    }
    deaths {
      label = Deaths
      description = Deaths
      type = integer
      sql = "{{table}}.deaths"
    }
    risk_level {
      label = Risk Level
      description = Risk Level
      type = string
      sql = "{{table}}.risk_level"
    }
  }
}
d
@musfiqur_rahman Great! Do you have a
tap_covid_19.topic.m5o
file in your
/model
directory as well?
m
Thank you @douwe_maan. I am checking that. 🙂
d
Also, don't forget to use the
.table.m5o
extension on that
risk_area
file of yours 🙂
Do be aware, though, that Meltano Analyze is alpha or beta-quality right now, especially when used with new/custom data sources, instead of those explicitly supported out of the box
It should all work in theory though, so I'll be more than happy to help you figure it out, so that we can improve the docs etc for future users 🙂
m
@douwe_maan > I renamed my file name
risk_area.table.m5o
and also added the
tap_covid_19.topic.m5o
. However, we I configure the pipeline I got following message
d
In your case, you've added them manually so you should be good 🙂
m
My
tap_covid_19.topic.m5o
files contains
Copy code
{
  version = 1
  name = custom_risk_area
  plugin_namespace = tap_covid_19
  label = Risk Area
  designs {
    risk_area {
      label = Risk Area
      from = risk_area
      description = Risk Area
      
    }
  }
}
d
All right, looks good to me
You're going to want some aggregates on that
risk_area.table.m5o
table though! Perhaps
deaths
would be more appropriate as an aggregate than a column?
m
What about this
Copy code
{
  version = 1
  sql_table_name = tap_covid_19.risk_area
  name = risk_area
  columns {
    country {
      label = Country
      description = Country
      type = string
      sql = "{{table}}.country"
    }
    risk_level {
      label = Risk Level
      description = Risk Level
      type = string
      sql = "{{table}}.risk_level"
    }
  }
  aggregates {
    deaths {
      label = Total Death
      description = Total Death
      type = sum
      sql = "{{table}}.deaths"
    }
  }

}
d
I think you’ll want to drop the schema from sql_table_name, but otherwise that looks good!
I’m gonna have lunch now, but if you run into any more trouble, I’d be happy to jump on a call later today or this week so we can figure this out together!
m
Sure @douwe_maan . I will let you know
@douwe_maan I have the explore option open now. However, it is showing me this panel
d
All right, the design you specified in your topic file should show up in that right-most column
If the progress indicators never go away, are you seeing any errors in Web Inspector?
m
Yes.
To be specific, in vuejs code, it cannot find models in installedPlugins. Let me know if did anything wrong.
d
Ah yeah, looks like this code only works correctly with model plugins present in your
meltano.yml
file; not custom models in the
/model
directory... that’s definitely an oversight and a bug. I’ll create an issue after lunch and will see if this will be easy to fix!
New issue: https://gitlab.com/meltano/meltano/-/issues/2135 Fix incoming 🙂
I'll release a new version with that fix tomorrow. If you'd like to try it out in the mean time, you can set up your local environment for UI development and check out the branch yourself: https://meltano.com/docs/contributor-guide.html#ui-development 🙂
m
Thank you so much @douwe_maan