8000 Empty init file in Fabric when running pipeline · Issue #2618 · dlt-hub/dlt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Empty init file in Fabric when running pipeline #2618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kolibrieight opened this issue May 9, 2025 · 0 comments
Open

Empty init file in Fabric when running pipeline #2618

kolibrieight opened this issue May 9, 2025 · 0 comments

Comments

@kolibrieight
Copy link

dlt version

1.10.0

Describe the problem

I have a rest API source that I funnel to a fabric lakehouse files section. I run it from a fabric python notebook. It extracts data successfully, However when I kill the session and run it again it can't find the init file. The init file is created but is empty, hence the error. It works if I re-run it in the same session.

Pipeline fortnox load step completed in 0.69 seconds
1 load package(s) were loaded to destination filesystem and into dataset customers_data
The filesystem destination used file:///synfs/lakehouse/default/Files/dlthub/fortnox location to store data
Load package 1746775954.3512297 is LOADED and contains no failed jobs

When running it a second time:

PipelineStepFailed: Pipeline execution failed at stage load when processing package 1746776041.8751009 with exception:

<class 'FileNotFoundError'>
[Errno 2] No such file or directory: '/synfs/lakehouse/default/Files/dlthub/fortnox/customers_data/_dlt_loads/init'

`

%pip install dlt
%pip install "dlt[az]"
%pip install "dlt[filesystem]"
import dlt
from dlt.sources.rest_api import rest_api_source

dlt.secrets["fortnox_api_token"] = access_token

source = rest_api_source({
"client": {
"base_url": base_url,#"https://api.fortnox.se/3",
"auth": {
"token": dlt.secrets["fortnox_api_token"],
},
"headers": {
"Content-Type": "application/json"
},
},
"resources": [
# Resource for fetching customer data
{
"name": resource_name,#"customers", # Resource name
"endpoint": {
"path": endpoint #"customers", # Dynamic path
},
}

]

})

from dlt.destinations import filesystem

bucket_url = "/lakehouse/default/Files/dlthub/fortnox/"

Define the pipeline

pipeline = dlt.pipeline(
pipeline_name="fortnox", # Pipeline name
destination=filesystem(
bucket_url= bucket_url #"/lakehouse/default/Files/fortnox/tmp"
),
dataset_name=f"{resource_name}_data", # Dataset name
dev_mode=False
# progress="enlighten", # Progress display method

)

Run the pipeline

load_info = pipeline.run(
source,
loader_file_format="parquet"
)
print(load_info)
print(dir(load_info))

print(load_info.load_packages)`

Expected behavior

Expected behaviour is that the init file should be populated.

Steps to reproduce

Run a fabric lakehouse

Operating system

Other

Runtime environment

Other

Python version

3.11

dlt data source

rest API, fortknox

dlt destination

Filesystem & buckets

Other deployment details

Fabric notebook

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant
0