<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sending email from databricks to google drive attachement in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32736#M23872</link>
    <description>&lt;P&gt;we are not using use azure, we read data from s3 and have  AWS infrastructure in backend, all spark jobs run on EMR through lambda and load data to s3, right now we are using databricks for reconciliation of data&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 16:13:38 GMT</pubDate>
    <dc:creator>AryaMa</dc:creator>
    <dc:date>2021-12-20T16:13:38Z</dc:date>
    <item>
      <title>Sending email from databricks to google drive attachement</title>
      <link>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32734#M23870</link>
      <description>&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/67088891/send-email-from-databricks-notebook-with-attachment" target="test_blank"&gt;https://stackoverflow.com/questions/67088891/send-email-from-databricks-notebook-with-attachment&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to send the attachment  to the organisation google drive folder directly instead of email any suggestions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample email with attachement code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;msg.attach(MIMEText(message))
&amp;nbsp;
    for path in files:
        part = MIMEBase('application', "octet-stream")
        with open(path, 'rb') as file:
            part.set_payload(file.read())
        encoders.encode_base64(part)
        part.add_header('Content-Disposition',
                        'attachment; filename="{}"'.format(Path(path).name))
        msg.attach(part)
&amp;nbsp;
    smtp = smtplib.SMTP(server, port)
    if use_tls:
        smtp.starttls()
    smtp.login(username, password)
    smtp.sendmail(send_from, send_to, msg.as_string())
    smtp.quit()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 16:08:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32734#M23870</guid>
      <dc:creator>AryaMa</dc:creator>
      <dc:date>2021-12-20T16:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sending email from databricks to google drive attachement</title>
      <link>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32735#M23871</link>
      <description>&lt;P&gt;Maybe just use azure logic apps or power automate (trigger as http requests with json and then all actions there)&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 16:11:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32735#M23871</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2021-12-20T16:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sending email from databricks to google drive attachement</title>
      <link>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32736#M23872</link>
      <description>&lt;P&gt;we are not using use azure, we read data from s3 and have  AWS infrastructure in backend, all spark jobs run on EMR through lambda and load data to s3, right now we are using databricks for reconciliation of data&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 16:13:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32736#M23872</guid>
      <dc:creator>AryaMa</dc:creator>
      <dc:date>2021-12-20T16:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sending email from databricks to google drive attachement</title>
      <link>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32737#M23873</link>
      <description>&lt;P&gt;yes I understand that you use AWS but google drive is also external service. Making post request from aws to logic apps in azure which than save it to google drive is just really easy way, efficient, quick to deploy and easy to monitor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option is to use lambda in AWS, so your script from databricks also call HTTP (just lambda endpoint not logic apps) and than lambda script can use Google drive API &lt;A href="https://developers.google.com/drive/api/v3/reference/files/create" target="test_blank"&gt;https://developers.google.com/drive/api/v3/reference/files/create&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also many other 3rd party or other solutions as well just this 2 are the ones which I used. &lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 16:27:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sending-email-from-databricks-to-google-drive-attachement/m-p/32737#M23873</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2021-12-20T16:27:12Z</dc:date>
    </item>
  </channel>
</rss>

