Skip to content

Conversation

@yevgenypats
Copy link
Contributor

@yevgenypats yevgenypats commented May 16, 2023

Closes #10729

@yevgenypats yevgenypats requested review from a team and disq and removed request for a team May 16, 2023 20:24
make test
```

https://REMBAZX.ZO72963.europe-west4.gcp.snowflakecomputing.com:443/session/v1/login-request?databaseName=testdb&requestId=e8d15dca-cd82-4995-77a1-c0dffc4f1a68&request_guid=36aac0a0-0221-4bd4-7108-fb0227f17bcc&schemaName=public&warehouse=test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure about this

@yevgenypats yevgenypats force-pushed the feat/snowflake_sdkv3 branch from 5862d89 to 08ac076 Compare May 16, 2023 20:32
@yevgenypats yevgenypats requested a review from disq May 16, 2023 20:42
u, err := strconv.ParseInt(val.(string), 10, 8)
if err != nil {
return err
return fmt.Errorf("failed to parse int8: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just go with AppendValueFromString everywhere

b.Append(val.([]uint8))
case *array.TimestampBuilder:
b.Append(arrow.Timestamp(val.(time.Time).UnixMicro()))
var timeVal time.Time
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I understand this comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of parsing manually you could use arrow.TimestampFromString(val.(string), b.Type().(*arrow.TimestampType).Unit

default:
return fmt.Errorf("unsupported timestamp unit %s", f.Type.(*arrow.TimestampType).Unit)
}
case array.ListLikeBuilder:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just use from string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure how from string will work here given it's time.Time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically we need to add to arrow AppendTime but for now not to block it we can just use this.

@yevgenypats yevgenypats requested a review from candiduslynx May 17, 2023 08:21
@yevgenypats yevgenypats merged commit 9b5dfe0 into main May 18, 2023
@yevgenypats yevgenypats deleted the feat/snowflake_sdkv3 branch May 18, 2023 06:37
kodiakhq bot pushed a commit that referenced this pull request May 18, 2023
🤖 I have created a release *beep* *boop*
---


## [2.1.0](plugins-destination-snowflake-v2.0.3...plugins-destination-snowflake-v2.1.0) (2023-05-18)


### Features

* **deps:** Upgrade to Apache Arrow v13 (latest `cqmain`) ([#10605](#10605)) ([a55da3d](a55da3d))
* **snowflake:** Migrate to SDK V3 native arrow ([#10822](#10822)) ([9b5dfe0](9b5dfe0))


### Bug Fixes

* **deps:** Update module github.com/aws/aws-sdk-go-v2/credentials to v1.13.24 ([#10787](#10787)) ([2056241](2056241))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.11.67 ([#10788](#10788)) ([fd660b2](fd660b2))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.0.8 ([#10798](#10798)) ([27ff430](27ff430))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Migrate plugin/destination/snowflake to github.com/cloudquery/plugin-sdk/v3

5 participants