-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(data-warehouse): add salesforce integration #23212
Conversation
Size Change: 0 B Total Size: 1.07 MB ℹ️ View Unchanged
|
"q": { | ||
"type": "incremental", | ||
"cursor_path": "SystemModstamp", | ||
"initial_value": "SELECT FIELDS(STANDARD) FROM Account WHERE SystemModstamp > 2000-01-01T00:00:00.000+0000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unclear how to do incremental with this rest query format. I tried to do this but initial_value needs to match the cursor_path type i believe and cursor_path in this case is a datetime.
Oddly enough, the data does return but dlt doesn't write it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @EDsCODE,
initial_value needs to match the cursor_path type i believe and cursor_path in this case is a datetime.
This is true. We're going to allow data conversion for the incremental params, here's the issue: dlt-hub/verified-sources#507
Please take a look to see if the proposed solution fits. Do we miss anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, having a custom function to map the types/parameters would be great.
I think the suggestion in the issue would be enough for my case as we would be receiving a timestamp field and I'd be transforming it into the full query to pass back in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EDsCODE the PR with this feature has been merged: dlt-hub/verified-sources#515
Please give it a go. We'll document it soon as well.
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR was closed due to lack of activity. Feel free to reopen if it's still relevant. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest source stuff mostly looks good - need to figure out refresh tokens and maybe make the UI changes through config
addToSalesforceButtonUrl: [ | ||
(s) => [s.preflight], | ||
(preflight) => { | ||
return (subdomain: string) => { | ||
const clientId = preflight?.data_warehouse_integrations?.salesforce.client_id | ||
|
||
if (!clientId) { | ||
return null | ||
} | ||
|
||
const params = new URLSearchParams() | ||
params.set('client_id', clientId) | ||
params.set('redirect_uri', `${window.location.origin}/data-warehouse/salesforce/redirect`) | ||
params.set('response_type', 'code') | ||
params.set('scope', 'refresh_token api') | ||
params.set('state', subdomain) | ||
|
||
return `https://${subdomain}.my.salesforce.com/services/oauth2/authorize?${params.toString()}` | ||
} | ||
}, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to have: to use Bens new oauth stuff he added - although there is certainly a larger piece of work around how we do credentials, so may not be one for now. e.g. storing S3 details, or Stripe connection details, etc.
requirements.in
Outdated
@@ -59,7 +59,7 @@ posthoganalytics==3.5.0 | |||
psycopg2-binary==2.9.7 | |||
PyMySQL==1.1.1 | |||
psycopg[binary]==3.1.18 | |||
pyarrow==15.0.0 | |||
pyarrow==17.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any breaking changes with 2 new major versions of pyarrow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not on dw end. DLT with delta requires it now
@tomasfarias note here incase of batch exports impact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed these updates altogether. Realized they weren't needed. Also, note that the DLT version upgrade causes a test to fail. Errors about s3 configuring missing
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
…g into dw-salesforce-integration
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
…g into dw-salesforce-integration
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
Problem
Changes
TODO:
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?