Skip to main content

#CSV0 personne en discute

My code :

 

⌗sign in 

 

tableau_auth = TSC.TableauAuth(user, password)

server = TSC.Server(r'http://yourserver.com')

server.use_server_version()

   

with server.auth.sign_in(tableau_auth):

 

⌗csv file create with view_item.csv

all_workbooks, pagination_item = server.workbooks.get()

wfound = [workbook for workbook in all_workbooks if workbook.name == 'MyWorkbook']

wconnect = server.workbooks.get_by_id(wfound[0].id)

server.workbooks.populate_views(wconnect)

vfound = [view for view in wconnect.views if len(view.name) > 0]

view_item = vfound[0]

server.views.populate_csv(view_item)

with open('view_csv.csv','wb') as f:

  f.write(b''.join(view_item.csv))

 

⌗subscrptions

target = TSC.Target('view iid', 'workbook')

schedule_id = ''

user_id = ''

new_sub = TSC.SubscriptionItem('My Subscription', schedule_id, user_id, target)

⌗new_sub.attach_image = False

⌗new_sub.attach_pdf = True

new_sub.message = "You have an alert!"

⌗new_sub.page_orientation = TSC.PDFRequestOptions.Orientation.Landscape

⌗new_sub.page_size_option = TSC.PDFRequestOptions.PageType.B4

new_sub.send_if_view_empty = True

new_sub = server.subscriptions.create(new_sub)

print(new_sub.subject)

 

Any idea on thisHow to attach the file in subsciption part.

So user recieve an CSV report(view_item..csv) as well.

Also is there any way i can name the report same as workbook name

@Chris McClellan

12 réponses
  1. 31 mars 2022, 06:32

    You can't attach a file to a subscription, you would have to email it as a separate file to them.

     

    I'd be worried what you're doing though, it feels like you're turning Tableau into an ETL tool - why not source the data from the same place that Tableau does ?

0/9000

Hi there,

 

I've been using Shapetotab (Grow your own Filled Maps | Tableau Support Community) to create polygons of places.

 

I've attached the files I generated using shapetotab

 

Now, the files open ok as they are (open the features table and on the Text File Connection dialogue, add the points file using the 'multiple tables' option).

 

The problem arises when I shut Tableau down and then make edits to the features table in excel. Any change at all and the files then won't open next time in Tableau. I get the following error when I try:

 

Microsoft JET database error 0x80004005: Type mismatch in expression.

 

I have used shapetotab in the past and then been able to add my own data in excel - i can't work out why it isn't working this time!

 

Any help appreciated!

3 réponses
  1. 7 févr. 2014, 12:47

    Right, worked this out.

     

    For anyone with the same issue, I had to copy all the contents of both documents generated by shapetotab and then paste the values into new documents and save them as CSV (Comma Delimited).

     

    I was then able to edit the features of features document as normal.

0/9000

Workbench - Bulk CSV export - Error: InvalidJob: Unable to find object: childaccounts

 

I'm getting an error when trying to run SOQL in workbench. The below query works fine if i choose the view as option "list", however if i choose "Bulk CSV" it throws an error? Any thoughts on how to export this without getting that error would be great :)

 

SELECT id, name, state__c, custid__c, (select state__c FROM childaccounts)

FROM account where owner.name = 'FAKE PERSON' and parentid = '' and solomon_address_key__c = ''

1 commentaire
0/9000

On the Salesforce end of things we've implemented some logic to prevent certain contacts ever syncing to Pardot and in test it seems to work as planned, but we still have 924 prospects in Pardot that went across before the changes were made.

 

What's the easiest way to bulk delete a list of prospects in Pardot?  I have the Prospect IDs and Email addresses in a CSV file, but there's no equivalent to Salesforce Data Loader for Pardot

10 commentaires
  1. 25 janv. 2024, 18:14

    What logic were you able to implement to prevent contacts from syncing to Pardot? I need to do this also.

0/9000

My code :

 

My code:

 

⌗sign in 

 

tableau_auth = TSC.TableauAuth(user, password)

server = TSC.Server(r'http://yourserver.com')

server.use_server_version()

   

with server.auth.sign_in(tableau_auth):

 

⌗csv file create with view_item.csv

all_workbooks, pagination_item = server.workbooks.get()

wfound = [workbook for workbook in all_workbooks if workbook.name == 'MyWorkbook']

wconnect = server.workbooks.get_by_id(wfound[0].id)

server.workbooks.populate_views(wconnect)

vfound = [view for view in wconnect.views if len(view.name) > 0]

view_item = vfound[0]

server.views.populate_csv(view_item)

with open('view_csv.csv','wb') as f:

  f.write(b''.join(view_item.csv))

 

⌗subscrptions

target = TSC.Target('', 'workbook')

schedule_id = ''

user_id = ''

new_sub = TSC.SubscriptionItem('My Subscription', schedule_id, user_id, target)

⌗new_sub.attach_image = False

⌗new_sub.attach_pdf = True

new_sub.message = "You have an alert!"

⌗new_sub.page_orientation = TSC.PDFRequestOptions.Orientation.Landscape

⌗new_sub.page_size_option = TSC.PDFRequestOptions.PageType.B4

new_sub.send_if_view_empty = True

new_sub = server.subscriptions.create(new_sub)

print(new_sub.subject)

 

⌗CSv file was downloded into curent Dir.

When i subscribe is there any possible to send mail with the csv file

1 réponse
0/9000

My Code :

tableau_auth = TSC.TableauAuth(user, password)

server = TSC.Server(r'http://yourserver.com')

server.use_server_version()

  

with server.auth.sign_in(tableau_auth):

 

#csv file create with view_item.csv

 

all_workbooks, pagination_item = server.workbooks.get()

wfound = [workbook for workbook in all_workbooks if workbook.name == 'MyWorkbook']

wconnect = server.workbooks.get_by_id(wfound[0].id)

server.workbooks.populate_views(wconnect)

vfound = [view for view in wconnect.views if len(view.name) > 0]

view_item = vfound[0]

server.views.populate_csv(view_item)

with open('view_csv.csv','wb') as f:

 f.write(b''.join(view_item.csv))

 

Is that possible to send filters with these codes.?How to extract the all the worksheets as seperate csv file?Request you to share your knowledge on this @Chris McClellan​ 

1 réponse
0/9000

Hello Dear Community, I have a question about DataLoader and hope you can answer it. I want to import an attachment file (PDF) into an account. I know now how this works but I have a question about the CSV. file that I create for the mapping:  In the header I specify

 

the API names of the fields. What do I specify in the header for the file name, the format (PDF) and the file path?  Greetings and thanks in advance!  

1 réponse
  1. 14 juil. 2021, 09:13

    Okay my question has been clarified. For those who also need an answer to the question: When you simulate an export with the DataLoader on the respective object, you get the names of the fields you need.

0/9000

Hi all,

 

I am new with Salesforce and i need to create a scheduled daily export of all our data.

I already found the "Weekly export service" in the web gui which looks like what i need.

 

But i need to automate this and export all data on a daily bases and export it to our

local fileshare server so we can include it in our backup cycle.

 

So i did find the Dataloader App and installed it on a Windows 10 Virtual machine.

The problem is that is need to find a way to be able export *all* data.

 

With the Dataloader i can create a batch file which will download data from a specific object.

 

This is an example i made:

 

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

    <bean id="csvAccountExtractProcess" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false">

      <description>csvAccountExtract job gets account info from salesforce and saves info into a CSV file."</description>

        <property name="name" value="csvAccountExtract"/>

        <property name="configOverrideMap">

            <map>

                <entry key="sfdc.debugMessages" value="false"/>

                <entry key="sfdc.debugMessagesFile" value="c:\dataloader_test\status\sfdcSoapTrace.log"/>

                <entry key="sfdc.endpoint" value="https://xxx.salesforce.com"/>

                <entry key="sfdc.username" value="user@domainname"/>

                <!-- password specified below is invalid, please generate one using the encrypt.bat utility -->

                <entry key="sfdc.password" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>

                <entry key="process.encryptionKeyFile" value="c:\dataloader_test\dataloader.key"/>

                <entry key="sfdc.timeoutSecs" value="600"/>

                <entry key="sfdc.loadBatchSize" value="200"/>

                <entry key="sfdc.entity" value="Account"/>

                <entry key="sfdc.extractionRequestSize" value="500"/>

                <entry key="sfdc.extractionSOQL" value="Select AccountNumber, AccountSource, AnnualRevenue, BillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy, BillingLatitude, BillingLongitude, BillingPostalCode, BillingState, BillingStreet, Company_email__c, CreatedById, CreatedDate, CurrencyIsoCode, DOZISF__ZoomInfo_First_Updated__c, DOZISF__ZoomInfo_Id__c, DOZISF__ZoomInfo_Last_Updated__c, DSCORGPKG__Conflict__c, DSCORGPKG__DO_3yr_Employees_Growth__c, DSCORGPKG__DO_3yr_Sales_Growth__c, DSCORGPKG__DeletedFromDiscoverOrg__c, DSCORGPKG__DiscoverOrg_Created_On__c, DSCORGPKG__DiscoverOrg_First_Update__c, DSCORGPKG__DiscoverOrg_FullCountryName__c, DSCORGPKG__DiscoverOrg_ID__c, DSCORGPKG__DiscoverOrg_LastUpdate__c, DSCORGPKG__DiscoverOrg_State_Full_Name__c, DSCORGPKG__DiscoverOrg_Technologies__c, DSCORGPKG__Exclude_Update__c, DSCORGPKG__External_DiscoverOrg_Id__c, DSCORGPKG__Fiscal_Year_End__c, DSCORGPKG__Fortune_Rank__c, DSCORGPKG__ITOrgChart__c, DSCORGPKG__IT_Budget__c, DSCORGPKG__IT_Employees__c, DSCORGPKG__Lead_Source__c, DSCORGPKG__Locked_By_User__c, DSCORGPKG__NAICS_Codes__c, DSCORGPKG__Ownership__c, DSCORGPKG__SIC_Codes__c, Description, Fax, Geolocation__Latitude__s, Geolocation__Longitude__s, Geolocation__c, Id, Industry, IsDeleted, Jigsaw, JigsawCompanyId, LastActivityDate, LastModifiedById, LastModifiedDate, LastReferencedDate, LastViewedDate, LinkedIn_Profile_Account__c, MasterRecordId, Metro_Area__c, Name, NumberOfEmployees, OwnerId, Ownership, ParentId, Phone, PhotoUrl, Rating, ShippingAddress, ShippingCity, ShippingCountry, ShippingGeocodeAccuracy, ShippingLatitude, ShippingLongitude, ShippingPostalCode, ShippingState, ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Twitter__c, Type, Website FROM Account"/>

                <entry key="process.operation" value="extract"/>

                <!-- <entry key="process.mappingFile" value="c:\dataloader_test\conf\accountExtractMap.sdl"/> -->

                <entry key="dataAccess.type" value="csvWrite"/>

                <entry key="dataAccess.name" value="c:\dataloader_test\dataexports\extract.csv"/>

            </map>

        </property>

    </bean>

</beans>

 

I have change the login credentials and password for security reasons.

This exports my data from the "Account" object into a .csv file.

 

I would like to know how i can export all data from every object from our Org.

 

I hope someone in this community can provide me an example or maybe a better way to achieve this?

2 commentaires
  1. 4 mai 2021, 10:18

    Thank you Dennis for your reply.

    Meanwhile i have found and scripted a solution which will work for us now.

    Using the free tool from

    https://fuseit.com/contact/downloads/fuseit-sfdc-explorer/

    and another free tool for downloading the Metadata i have created some scripts to schedule this on a Windows machine.

    And it will email the task event results so i can monitor if backups where successful.

    This way we at least have a weekly data export with Metadata.

0/9000

Hi

 

Can anyone tell me how to resolve this error on Einstein Analytics.

 

After uploading the CSV file, it is showing "You no longer have access to this dataset or it has been deleted. To get access, contact the administrator."

 

Not sure how to proceed.

1 commentaire
  1. 4 avr. 2021, 08:18

    Is the dataset created by someone who is no more active in your org ?

    Can you see if you have EA Admin permission set ?

0/9000

Hi,

 

Can someone answer a simple question.

 

Google/SFDC documentation says that Metadata JSON file is optional while uploading any external dataset on EA - you can google it, if you want or see the attachment in comments. But when I tried to upload CSV file, Data Schema file is created bydefault. Also when the CSV file is distorted and system is not able to create JSON file, it gives an error and does not allow to upload CSV file.

 

Does it not mean that Metadata JSON file is mandatory ?

4 commentaires
0/9000