OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Where do I want to see the data source's file location for the Great Expectations?

  • Thread starter Thread starter Daffa Darwin
  • Start date Start date
D

Daffa Darwin

Guest
Basically, I want to check on the great expectations that I've set for my bootcamp project.

I run the code below:

Code:
# Give a name to a Datasource. This name must be unique between Datasources.
datasource_name = 'supermarketSales'
datasource = context.sources.add_pandas(datasource_name)

# Give a name to a data asset
asset_name = 'sales of supermarket'
path_to_data = 'P2M3_Daffa_Darwin_data_clean.csv'
asset = datasource.add_csv_asset(asset_name, filepath_or_buffer=path_to_data)

# Build batch request
batch_request = asset.build_batch_request()

Then the output is like this:

Code:
DataContextError: Can not write the fluent datasource supermarketSales because a datasource of that name already exists in the data context.

Although, I've done it in my bootcamp and graduated, then I want to check again if it still works or not.
<p>Basically, I want to check on the great expectations that I've set for my bootcamp project.</p>
<p>I run the code below:</p>
<pre><code># Give a name to a Datasource. This name must be unique between Datasources.
datasource_name = 'supermarketSales'
datasource = context.sources.add_pandas(datasource_name)

# Give a name to a data asset
asset_name = 'sales of supermarket'
path_to_data = 'P2M3_Daffa_Darwin_data_clean.csv'
asset = datasource.add_csv_asset(asset_name, filepath_or_buffer=path_to_data)

# Build batch request
batch_request = asset.build_batch_request()
</code></pre>
<p>Then the output is like this:</p>
<pre><code>DataContextError: Can not write the fluent datasource supermarketSales because a datasource of that name already exists in the data context.
</code></pre>
<p>Although, I've done it in my bootcamp and graduated, then I want to check again if it still works or not.</p>
 
Top