Skip to main content
krishnapriya Arisetti a posé une question dans #Tableau Server

This script is failing with path issue. I am trying is this correct way i am doing.

 

Appreciate help.

 

import os

import shutil

import pandas as pd 

 

def Save_as(df):

# Specify the source Hyper file and its location

  source_hyper_file = r'https://<Server URL>/#/site/Finance/explore/datasource/30356'

 

# Specify the destination folder and the new name for the Hyper file

  destination_folder = r'https://<Server URL>/#/site/Finance/projects/218'

  new_hyper_file_name = 'Entitlements_Final_1023.tdsx'

 

# Construct the full path to the destination Hyper file

  destination_hyper_file = os.path.join(destination_folder, new_hyper_file_name)

 

# Copy the source Hyper file to the destination with the new name

  shutil.copyfile(source_hyper_file, destination_hyper_file)

 

  return df

1 réponse
  1. 26 oct. 2023, 03:08

    Hi @krishnapriya Arisetti​ 

    This is the same question as yesterday right? https://community.tableau.com/s/question/0D58b0000BiogCmCQI/how-to-find-physical-location-of-data-sources-on-physical-machine

     

    I don't understand why you're using any of those libraries that you currently are, and not using the Tableau libraries and/or API to do the same thing?

     

    If you don't use the Tableau methods, it won't work.

     

    You will need to login to both servers in order to get access to the extract so you can download and upload.

     

    ----------------------------------------------------------------------------------------------------------------

    Please upvote my helpful replies & choose Select as Best Answer if it really is the best :)