You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from beam_nuggets.io import relational_db
with beam.Pipeline(options=PipelineOptions()) as p:
source_config = relational_db.SourceConfiguration(
drivername='sqlite',
database='/sqlite/dbs/chinook'
)
print(source_config.url)
records = p | "Reading records from db" >> relational_db.ReadFromDB(
source_config=source_config,
table_name='customers',
query='select * from customers' # optional. When omitted, all table records are returned.
)
records | 'Writing to stdout' >> beam.Map(print)
I receive this error, what am I doing wrong??
C:\Users\chuck.brooks\Miniconda3\envs\base38\python.exe C:/PycharmProjects/base38/beam_nuggets_test.py
sqlite:////sqlite/dbs/chinook
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1233, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 581, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1368, in apache_beam.runners.common._OutputProcessor.process_outputs
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db.py", line 96, in process
for record in db.query(table_name, query):
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db_api.py", line 272, in query
table = self._open_table_for_read(table_name)
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db_api.py", line 305, in _open_table_for_read
return self._open_table(
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db_api.py", line 322, in _open_table
self._get_table(name, get_table_f, **get_table_f_params)
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db_api.py", line 332, in _get_table
raise SqlAlchemyDbException('Failed to get table {}'.format(name))
beam_nuggets.io.relational_db_api.SqlAlchemyDbException: Failed to get table customers
During handling of the above exception, another exception occurred:
The text was updated successfully, but these errors were encountered:
I am running the following simple python script:
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from beam_nuggets.io import relational_db
with beam.Pipeline(options=PipelineOptions()) as p:
source_config = relational_db.SourceConfiguration(
drivername='sqlite',
database='/sqlite/dbs/chinook'
)
I receive this error, what am I doing wrong??
C:\Users\chuck.brooks\Miniconda3\envs\base38\python.exe C:/PycharmProjects/base38/beam_nuggets_test.py
sqlite:////sqlite/dbs/chinook
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1233, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 581, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1368, in apache_beam.runners.common._OutputProcessor.process_outputs
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db.py", line 96, in process
for record in db.query(table_name, query):
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db_api.py", line 272, in query
table = self._open_table_for_read(table_name)
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db_api.py", line 305, in _open_table_for_read
return self._open_table(
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db_api.py", line 322, in _open_table
self._get_table(name, get_table_f, **get_table_f_params)
File "C:\Users\chuck.brooks\Miniconda3\envs\base38\lib\site-packages\beam_nuggets\io\relational_db_api.py", line 332, in _get_table
raise SqlAlchemyDbException('Failed to get table {}'.format(name))
beam_nuggets.io.relational_db_api.SqlAlchemyDbException: Failed to get table customers
During handling of the above exception, another exception occurred:
The text was updated successfully, but these errors were encountered: