Skip to content

Commit

Permalink
Adding more logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Nov 21, 2024
1 parent 307eb53 commit aff143a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions clients/bigquery/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package bigquery
import (
"context"
"fmt"
"log/slog"
"strings"

"github.com/artie-labs/transfer/clients/shared"
Expand Down Expand Up @@ -31,6 +32,7 @@ func (s *Store) Merge(ctx context.Context, tableData *optimization.TableData) er
additionalEqualityStrings = []string{mergeString}
}

slog.Info("### Starting to merge", s.config.SharedDestinationSettings.ColumnSettings.BigQueryNumericForVariableNumeric)

Check failure on line 35 in clients/bigquery/merge.go

View workflow job for this annotation

GitHub Actions / test

slog.Info arg "s.config.SharedDestinationSettings.ColumnSettings.BigQueryNumericForVariableNumeric" should be a string or a slog.Attr (possible missing key or value)

Check failure on line 35 in clients/bigquery/merge.go

View workflow job for this annotation

GitHub Actions / test

slog.Info arg "s.config.SharedDestinationSettings.ColumnSettings.BigQueryNumericForVariableNumeric" should be a string or a slog.Attr (possible missing key or value)
return shared.Merge(ctx, s, tableData, types.MergeOpts{
AdditionalEqualityStrings: additionalEqualityStrings,
ColumnSettings: s.config.SharedDestinationSettings.ColumnSettings,
Expand Down
2 changes: 1 addition & 1 deletion clients/shared/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func CreateTable(ctx context.Context, dwh destination.DataWarehouse, tableData *
return fmt.Errorf("failed to build create table sql: %w", err)
}

slog.Info("[DDL] Executing query", slog.String("query", query))
slog.Info("[DDL] Executing query", slog.String("query", query), slog.Bool("numeric setting", settings.BigQueryNumericForVariableNumeric))
if _, err = dwh.ExecContext(ctx, query); err != nil {
return fmt.Errorf("failed to create temp table: %w", err)
}
Expand Down
1 change: 1 addition & 0 deletions lib/destination/ddl/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func BuildCreateTableSQL(settings config.SharedDestinationColumnSettings, dialec
primaryKeys = append(primaryKeys, colName)
}

slog.Info("settings", settings.BigQueryNumericForVariableNumeric)

Check failure on line 37 in lib/destination/ddl/ddl.go

View workflow job for this annotation

GitHub Actions / test

slog.Info arg "settings.BigQueryNumericForVariableNumeric" should be a string or a slog.Attr (possible missing key or value)

Check failure on line 37 in lib/destination/ddl/ddl.go

View workflow job for this annotation

GitHub Actions / test

slog.Info arg "settings.BigQueryNumericForVariableNumeric" should be a string or a slog.Attr (possible missing key or value)
parts = append(parts, fmt.Sprintf("%s %s", colName, dialect.DataTypeForKind(col.KindDetails, col.PrimaryKey(), settings)))
}

Expand Down

0 comments on commit aff143a

Please sign in to comment.