Sample Header Ad - 728x90

Clickhouse create database structure for json data

0 votes
1 answer
2120 views
New to clickhouse and stuck on the database creation structure for importing json data which is nested Take for example the json data that looks like the following when there is data populated
"FirewallMatchesActions": [
    "allow"
  ],
  "FirewallMatchesRuleIDs": [
    "1234abc"
  ],
  "FirewallMatchesSources": [
    "firewallRules"
  ],
or
"FirewallMatchesActions": [
    "allow",
    "block"
  ],
  "FirewallMatchesRuleIDs": [
    "1234abc",
    "1235abb"
  ],
  "FirewallMatchesSources": [
    "firewallRules"
  ],
but there maybe json data which doesn't have them populated
"FirewallMatchesActions": [],
  "FirewallMatchesRuleIDs": [],
  "FirewallMatchesSources": [],
what would the clickhouse create database structure look like ?
Asked by p4guru (296 rep)
Jun 12, 2020, 01:52 AM
Last activity: Jun 12, 2020, 06:14 AM