Netflow.nfacct

From Initech Technical Wiki
Jump to: navigation, search

This is the schema of the netflow.nfacct 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 netflow.nfacct (
`stamp_updated` DateTime, 
`as_src` UInt64, 
`as_dst` UInt64, 
`peer_ip_src` String, 
`iface_in` UInt64, 
`iface_out` UInt64, 
`ip_src` String, 
`ip_dst` String, 
`port_src` UInt64, 
`port_dst` UInt64, 
`tcp_flags` UInt8, 
`ip_proto` String, 
`tos` UInt8, 
`packets` UInt64, 
`bytes` UInt64
) ENGINE = MergeTree() PARTITION BY toYYYYMMDD(stamp_updated) PRIMARY KEY stamp_updated ORDER BY stamp_updated SETTINGS index_granularity = 8192