We have standard reports uploaded as PDFs on a daily basis. In the PDFs are some tables that we want to pull into datasets. I have tabula imported in code repositories but I can't seem to get code repositories to bring in the PDF.
I recieve this error:
"Error loading inputs"
"{"message":"Unable to resolve alias","alias":"/US Office/COO/pdf_tests/test.pdf","fallbackBranches":["master"]}"
And this is the very basic code I am using:
from transforms.api import transform_df, Input, Output
import tabula
@transform_df(
Output("/US Office/COO/pdf_tests/datasets/pdf_read"),
source_df=Input("/US Office/COO/pdf_tests/test.pdf"),
)
def compute(source_df):
df = source_df
df = tabula.read_pdf(df, pages='all')
return df
I can easily make tabula output a csv with my local python install just not in Foundry. Any help you can give would be great as I am very new to Palantir foundry and code repositories.
Thank You!
