Pull data from google sheet and load into postgres DB

Highlighted
Five Stars

Pull data from google sheet and load into postgres DB

Currently, I want to pull data from google sheets, alter it with tMap and then load it into a postgres db. I am using tGoogleDriveConnection and then tGoogleDriveGet to retrieve the csv. However, I can't figure out how to use tMap because when the file is loaded, it doesn't have any column structure--it just says "content". Does anyone know how I may be able to load the data in correctly?


Accepted Solutions
Employee

Re: Pull data from google sheet and load into postgres DB

Hi,

 

    The tGoogleDriveGet component will only help you to get the file from Google Drive to your local machine at a directory of your choice.

 

     Once the file is available in your local, you need to read it like any other file from local using file components. For example, if its a csv file, use a tFileInputDelimited to read the file present in the local folder. You need to provide necessary schema details in this File Input component.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved


All Replies
Employee

Re: Pull data from google sheet and load into postgres DB

Hi,

 

    The tGoogleDriveGet component will only help you to get the file from Google Drive to your local machine at a directory of your choice.

 

     Once the file is available in your local, you need to read it like any other file from local using file components. For example, if its a csv file, use a tFileInputDelimited to read the file present in the local folder. You need to provide necessary schema details in this File Input component.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Five Stars

Re: Pull data from google sheet and load into postgres DB

Hi Nikhil,

 

Thank you for your response! I made a little progress with your tip; however, now I am getting an error on my tGoogleDriveGet that says "invalid escape sequence". Do you know what may be creating this error?

 

Fixed it!

Employee

Re: Pull data from google sheet and load into postgres DB

Cool!

 

Could you please mark the topic as resolved so that it will help other Talend community members?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog