Difference between revisions of "Softswitch.cdr"

From Initech Technical Wiki
Jump to: navigation, search
(Created page with " <pre> CREATE TABLE softswitch.cdr ( `cdrid` UInt64, `cdr_hop` String, `hop_type` String, `calldate` DateTime, `calldate_utc` DateTime, `caller` String, `caller_area` S...")
 
 
Line 1: Line 1:
 
+
This is the schema of the softswitch.cdr table in [[clickhouse]], you should be able to copy and paste this into [[clickhouse-client]] (make sure that you invoke [[clickhouse-client]] with the -m argument so that it will accept multi-line queries)
  
 
<pre>
 
<pre>

Latest revision as of 22:57, 18 October 2019

This is the schema of the softswitch.cdr table in clickhouse, you should be able to copy and paste this into clickhouse-client (make sure that you invoke clickhouse-client with the -m argument so that it will accept multi-line queries)

CREATE TABLE softswitch.cdr (
`cdrid` UInt64, 
`cdr_hop` String, 
`hop_type` String, 
`calldate` DateTime, 
`calldate_utc` DateTime, 
`caller` String, 
`caller_area` String, 
`caller_private` UInt8, 
`caller_owning_carrier` String, 
`caller_addr` String, 
`caller_user` String, 
`local_user` String, 
`local_accountguid` String, 
`local_number` String, 
`called` String, 
`called_area` String, 
`called_owning_carrier` String, 
`called_accountguid` String, 
`called_user` String, 
`duration_setup` UInt64, 
`duration` UInt64, 
`error` String, 
`reason` String, 
`cdr_pin` String, 
`sessionguid` String, 
`native_cdrid` UInt64, 
`caller_called_nature` String
) ENGINE = MergeTree() PARTITION BY toYYYYMMDD(calldate) PRIMARY KEY calldate ORDER BY calldate SETTINGS index_granularity = 8192