File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const (
1616 MetadataTableDescription = "cq:table_description"
1717 MetadataTableTitle = "cq:table_title"
1818 MetadataTableDependsOn = "cq:table_depends_on"
19+ MetadataTableIsPaid = "cq:table_paid"
1920)
2021
2122type Schemas []* arrow.Schema
Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ type Table struct {
8787 Parent * Table `json:"-"`
8888
8989 PkConstraintName string `json:"pk_constraint_name"`
90+
91+ // IsPaid indicates whether this table is a paid (premium) table.
92+ // This relates to the CloudQuery plugin itself, and should not be confused
93+ // with whether the table makes use of a paid API or not.
94+ IsPaid bool `json:"is_paid"`
9095}
9196
9297var (
@@ -158,6 +163,9 @@ func NewTableFromArrowSchema(sc *arrow.Schema) (*Table, error) {
158163 if isIncremental , found := tableMD .GetValue (MetadataIncremental ); found {
159164 table .IsIncremental = isIncremental == MetadataTrue
160165 }
166+ if isPaid , found := tableMD .GetValue (MetadataTableIsPaid ); found {
167+ table .IsPaid = isPaid == MetadataTrue
168+ }
161169 return table , nil
162170}
163171
@@ -407,6 +415,9 @@ func (t *Table) ToArrowSchema() *arrow.Schema {
407415 if t .Parent != nil {
408416 md [MetadataTableDependsOn ] = t .Parent .Name
409417 }
418+ if t .IsPaid {
419+ md [MetadataTableIsPaid ] = MetadataTrue
420+ }
410421 schemaMd := arrow .MetadataFrom (md )
411422 for i , c := range t .Columns {
412423 fields [i ] = c .ToArrowField ()
You can’t perform that action at this time.
0 commit comments