-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Source Salesforce: NewValue and OldValue columns are not getting pulled for OpportunityFieldHistory #6886
Comments
Hi @marcosmarxm
In all cases, I got |
Hello @yevhenii-ldv I enabled the LeadHistory option and edited a lead in the integration account. Query 1Now when I apply the query to get the newValue and oldValue from leadHistory object I got: No NewValue or OldValue column or values Query 2If I only use the newValue and oldValue column: Query 3If I use the newValue and oldValue column at the beggining from the first query: |
This code use only request and should work to query Salesforce LeadHistory. import requests
from urllib.parse import urlencode
instance_url = ''
consumer_key = ''
consumer_secret = ''
username = ''
password = ''
token_url = f'{instance_url}/services/oauth2/token'
data = {
'grant_type': 'password',
'client_id': f'{consumer_key}',
'client_secret': f'{consumer_secret}',
'username': f'{username}',
'password': f'{password}'
}
r1 = requests.post(token_url, data=data)
d1 = r1.json()
token = d1['access_token']
headers = {'Authorization': f'Bearer {token}'}
api_versions_url = f'{instance_url}/services/data/'
r2 = requests.get(api_versions_url, headers=headers)
d2 = r2.json()
api_ver = d2[-1]['url']
api_url = f'{instance_url}{api_ver}'
query_url = f'{api_url}/query/'
query = """SELECT CreatedById,CreatedDate,DataType,Field,Id,IsDeleted,LeadId,NewValue,OldValue FROM LeadHistory ORDER BY NewValue ASC NULLS LAST"""
query_url_final = f'{query_url}?{urlencode({"q":query})}'
r3 = requests.get(query_url_final, headers=headers)
d3 = r3.json() |
@yevhenii-ldv I thinks can be closed right? |
@marcosmarxm I think not yet: |
@yevhenii-ldv Just tried out the new version, but I still see empty arrays in the destination for OldValue and NewValue fields. Am I missing something?
|
@sarunaskas Could you please clarify which API Type you are using in your config: REST or BULK? |
@yevhenii-ldv Thanks for the reply. I am using BULK. |
@sarunaskas I made a small update for the Salesforce connector, could you tried out the new version (0.1.4) and tell me the result of your sync? |
@yevhenii-ldv Now I do see the OldValue and NewValue in raw Still seeing the same warning:
|
@sarunaskas Are you trying to fill in the same already created table in BigQuery or are you creating a new one? |
@yevhenii-ldv I tried resetting the dataset, but that did not help. What may be interesting is that the BigQuery schema says those two are string |
@sarunaskas These two fields should be expected as |
@yevhenii-ldv deleted the connection and the dataset in BigQuery. While trying to establish the connection from scratch I am getting a completely white screen while "We are fetching the schema of your data source." step is happening. This is what I see in Console, but unsure if this is related. I am currently on 0.30.22-alpha. |
@sarunaskas |
Hi @sarunaskas I have good news for you :) Note: in case of updating the version and starting data reading, please create a new |
Hey @yevhenii-ldv. Thanks for the good news, however, I am still unable to establish the connection anymore. We bumped up the airbyte version to 0.30.37-alpha, however, I am still getting the blank screen and the errors I listed earlier in the console upon schema fetching. Other sources work, Salesforce seems to be a special case. I am now on 0.1.5 SF source version. |
@yevhenii-ldv I am still stuck in the same situation. Maybe you have any ideas how to resolve this? Still can't get past the the schema fetch. Quite a big blocker for us. Maybe I should raise this as a separate issue? |
Enviroment
Current Behavior
"OldValue" and "NewValue" fields from
OpportunityFieldHistory
are not being pulled into BigQuery.Checking BigQuery, none of the rows in
_airbyte_raw_OpportunityFieldHistory
have OldValue or NewValue in the_airbyte_data
column.In the connection settings page the Data types for these two columns are being considered as
array
which might be incorrect Salesforce ref.Expected Behavior
Would expect to see those two columns fetched and stored as strings containing the values. These two columns are critical to our adoption of Airbyte.
Logs
Potentially relevant parts of the LOG
Steps to Reproduce
OpportunityFieldHistory
with Full refresh | OverwriteAre you willing to submit a PR?
Not technically capable
The text was updated successfully, but these errors were encountered: