I want to connect my neo4j's project server to py2neo in jupyter
I actually have 2 problems:
Given below is a picture of my neo4j browser connected with bolt//:localhost:11004, username: neo4j, password: password
But i am not able to connect to this server through py2neo on jupyter notebook.
The code in python is the following:
graphdb = Graph("bolt://localhost:11004", secure=True, auth=('neo4j', 'password'))
I am getting the following error:
KeyError Traceback (most recent call last)
~/conda3/lib/python3.6/site-packages/py2neo/database.py in __new__(cls, uri, **settings)
87 try:
---> 88 inst = cls._instances[key]
89 except KeyError:
KeyError: '0611fb007d1a660e26e66e58777225de'
During handling of the above exception, another exception occurred:
ServiceUnavailable Traceback (most recent call last)
<ipython-input-41-2d6567e9c5ba> in <module>()
3 # default uri for local Neo4j instance
4 dict_params=dict(secure=True)
----> 5 graphdb = Graph(**dict_params)
~/conda3/lib/python3.6/site-packages/py2neo/database.py in __new__(cls, uri, **settings)
303 def __new__(cls, uri=None, **settings):
304 name = settings.pop("name", "data")
--> 305 database = Database(uri, **settings)
306 if name in database:
307 inst = database[name]
~/conda3/lib/python3.6/site-packages/py2neo/database.py in __new__(cls, uri, **settings)
95 auth=connection_data["auth"],
96 encrypted=connection_data["secure"],
---> 97 user_agent=connection_data["user_agent"])
98 inst._graphs = {}
99 cls._instances[key] = inst
~/conda3/lib/python3.6/site-packages/neo4j/v1/api.py in __new__(cls, uri, **config)
131 for subclass in Driver.__subclasses__():
132 if parsed.scheme == subclass.uri_scheme:
--> 133 return subclass(uri, **config)
134 raise ValueError("URI scheme %r not supported" % parsed.scheme)
135
~/conda3/lib/python3.6/site-packages/neo4j/v1/direct.py in __new__(cls, uri, **config)
71
72 pool = DirectConnectionPool(connector, instance.address, **config)
---> 73 pool.release(pool.acquire())
74 instance._pool = pool
75 instance._max_retry_time = config.get("max_retry_time", default_config["max_retry_time"])
~/conda3/lib/python3.6/site-packages/neo4j/v1/direct.py in acquire(self, access_mode)
42
43 def acquire(self, access_mode=None):
---> 44 return self.acquire_direct(self.address)
45
46
~/conda3/lib/python3.6/site-packages/neo4j/bolt/connection.py in acquire_direct(self, address)
448 if can_create_new_connection:
449 try:
--> 450 connection = self.connector(address, self.connection_error_handler)
451 except ServiceUnavailable:
452 self.remove(address)
~/conda3/lib/python3.6/site-packages/neo4j/v1/direct.py in connector(address, error_handler)
68
69 def connector(address, error_handler):
---> 70 return connect(address, security_plan.ssl_context, error_handler, **config)
71
72 pool = DirectConnectionPool(connector, instance.address, **config)
~/conda3/lib/python3.6/site-packages/neo4j/bolt/connection.py in connect(address, ssl_context, error_handler, **config)
702 raise ServiceUnavailable("Failed to resolve addresses for %s" % address)
703 else:
--> 704 raise last_error
~/conda3/lib/python3.6/site-packages/neo4j/bolt/connection.py in connect(address, ssl_context, error_handler, **config)
692 log_debug("~~ [RESOLVED] %s -> %s", address, resolved_address)
693 try:
--> 694 s = _connect(resolved_address, **config)
695 s, der_encoded_server_certificate = _secure(s, address[0], ssl_context, **config)
696 connection = _handshake(s, resolved_address, der_encoded_server_certificate, error_handler, **config)
~/conda3/lib/python3.6/site-packages/neo4j/bolt/connection.py in _connect(resolved_address, **config)
582 _force_close(s)
583 if error.errno in (61, 99, 111, 10061):
--> 584 raise ServiceUnavailable("Failed to establish connection to {!r} (reason {})".format(resolved_address, error.errno))
585 else:
586 raise
ServiceUnavailable: Failed to establish connection to ('127.0.0.1', 7687) (reason 111)
What i want to know is
1) The connection between neo4j and py2neo is made how exactly in py2neo v4
2) Do i always have to make a local connection or can i connect to the neo4j server
3) If i can connect to my neo4j server is it such that whatever py2neo queries i run on my jupyter notebook shall synchronise with the neo4j database too?
From the last line of the error, it looks like it's trying to connect on default bolt port (i.e. 7687).
I would suggest you use this format instead of full URI.
graphdb = Graph(scheme="bolt", host="localhost", port=11004,
secure=True, auth=('neo4j', 'password'))
Related
While using import torch_geometric I get a module not found error from torch_geometric.data. import torch runs without an error.
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[2], line 1
----> 1 import torch_geometric
File ~\anaconda3\envs\python3_8_10\lib\site-packages\torch_geometric\__init__.py:4
1 from types import ModuleType
2 from importlib import import_module
----> 4 import torch_geometric.data
5 import torch_geometric.loader
6 import torch_geometric.transforms
File ~\anaconda3\envs\python3_8_10\lib\site-packages\torch_geometric\data\__init__.py:1
----> 1 from .data import Data
2 from .hetero_data import HeteroData
3 from .temporal import TemporalData
File ~\anaconda3\envs\python3_8_10\lib\site-packages\torch_geometric\data\data.py:20
18 import torch
19 from torch import Tensor
---> 20 from torch_sparse import SparseTensor
22 from torch_geometric.data.feature_store import (
23 FeatureStore,
24 FeatureTensorType,
25 TensorAttr,
26 _field_status,
27 )
28 from torch_geometric.data.graph_store import (
29 EDGE_LAYOUT_TO_ATTR_NAME,
30 EdgeAttr,
(...)
34 edge_tensor_type_to_adj_type,
35 )
File ~\anaconda3\envs\python3_8_10\lib\site-packages\torch_sparse\__init__.py:19
17 spec = cuda_spec or cpu_spec
18 if spec is not None:
---> 19 torch.ops.load_library(spec.origin)
20 else: # pragma: no cover
21 raise ImportError(f"Could not find module '{library}_cpu' in "
22 f"{osp.dirname(__file__)}")
File ~\anaconda3\envs\python3_8_10\lib\site-packages\torch\_ops.py:255, in _Ops.load_library(self, path)
250 path = torch._utils_internal.resolve_library_path(path)
251 with dl_open_guard():
252 # Import the shared library into the process, thus running its
253 # static (global) initialization code in order to register custom
254 # operators with the JIT.
--> 255 ctypes.CDLL(path)
256 self.loaded_libraries.add(path)
File ~\anaconda3\envs\python3_8_10\lib\ctypes\__init__.py:381, in CDLL.__init__(self, name, mode, handle, use_errno, use_last_error, winmode)
378 self._FuncPtr = _FuncPtr
380 if handle is None:
--> 381 self._handle = _dlopen(self._name, mode)
382 else:
383 self._handle = handle
FileNotFoundError: Could not find module 'C:\Users\fes33\anaconda3\envs\python3_8_10\Lib\site-packages\torch_sparse\_convert_cuda.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
How can I get rid of it?
I am trying to run a jee batch application. It works fine in my local machine but when I am trying to run the same jee application in a docker container, I am getting the below exception in joblogs
com.ibm.jbatch.container.exception.BatchContainerRuntimeException: Failure in Read-Process-Write Loop
89 at com.ibm.jbatch.container.controller.impl.ChunkStepControllerImpl.invokeChunk(ChunkStepControllerImpl.java:704)
90 at com.ibm.jbatch.container.controller.impl.ChunkStepControllerImpl.invokeCoreStep(ChunkStepControllerImpl.java:795)
91 at com.ibm.jbatch.container.controller.impl.BaseStepControllerImpl.execute(BaseStepControllerImpl.java:295)
92 at com.ibm.jbatch.container.controller.impl.ExecutionTransitioner.doExecutionLoop(ExecutionTransitioner.java:118)
93 at com.ibm.jbatch.container.controller.impl.WorkUnitThreadControllerImpl.executeCoreTransitionLoop(WorkUnitThreadControllerImpl.java:96)
94 at com.ibm.jbatch.container.controller.impl.WorkUnitThreadControllerImpl.executeWorkUnit(WorkUnitThreadControllerImpl.java:178)
95 at com.ibm.jbatch.container.controller.impl.WorkUnitThreadControllerImpl$AbstractControllerHelper.runExecutionOnThread(WorkUnitThreadControllerImpl.java:503)
96 at com.ibm.jbatch.container.controller.impl.WorkUnitThreadControllerImpl.runExecutionOnThread(WorkUnitThreadControllerImpl.java:92)
97 at com.ibm.jbatch.container.util.BatchWorkUnit.run(BatchWorkUnit.java:117)
98 at com.ibm.ws.context.service.serializable.ContextualRunnable.run(ContextualRunnable.java:79)
99 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
100 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
101 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
102 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
103 at java.lang.Thread.run(Thread.java:748)
104 Caused by: com.ibm.jbatch.container.exception.TransactionManagementException: javax.transaction.RollbackException
105 at com.ibm.jbatch.container.transaction.impl.JTAUserTransactionAdapter.commit(JTAUserTransactionAdapter.java:108)
106 at com.ibm.jbatch.container.controller.impl.ChunkStepControllerImpl.invokeChunk(ChunkStepControllerImpl.java:656)
107 ... 14 more
108 Caused by: javax.transaction.RollbackException
109 at com.ibm.tx.jta.impl.TransactionImpl.stage3CommitProcessing(TransactionImpl.java:980)
110 at com.ibm.tx.jta.impl.TransactionImpl.processCommit(TransactionImpl.java:778)
111 at com.ibm.tx.jta.impl.TransactionImpl.commit(TransactionImpl.java:711)
112 at com.ibm.tx.jta.impl.TranManagerImpl.commit(TranManagerImpl.java:165)
113 at com.ibm.tx.jta.impl.TranManagerSet.commit(TranManagerSet.java:113)
114 at com.ibm.tx.jta.impl.UserTransactionImpl.commit(UserTransactionImpl.java:162)
115 at com.ibm.tx.jta.embeddable.impl.EmbeddableUserTransactionImpl.commit(EmbeddableUserTransactionImpl.java:101)
116 at com.ibm.ws.transaction.services.UserTransactionService.commit(UserTransactionService.java:72)
117 at com.ibm.jbatch.container.transaction.impl.JTAUserTransactionAdapter.commit(JTAUserTransactionAdapter.java:101)
118 ... 15 more
119 Caused by: oracle.jdbc.xa.OracleXAException: XAErr (-7): Resource manager is unavailable. ORA-17008 SQLErr (0)
120 at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1112)
121 at oracle.jdbc.xa.client.OracleXAResource.end(OracleXAResource.java:466)
122 at com.ibm.ws.rsadapter.impl.WSRdbXaResourceImpl.end(WSRdbXaResourceImpl.java:417)
123 at com.ibm.ejs.j2c.XATransactionWrapper.end(XATransactionWrapper.java:384)
124 at com.ibm.ws.Transaction.JTA.JTAResourceBase.end(JTAResourceBase.java:218)
125 at com.ibm.tx.jta.impl.RegisteredResources.sendEnd(RegisteredResources.java:941)
126 at com.ibm.tx.jta.impl.RegisteredResources.distributeEnd(RegisteredResources.java:920)
127 at com.ibm.tx.jta.impl.TransactionImpl.internalRollback(TransactionImpl.java:1624)
128 at com.ibm.tx.jta.impl.TransactionImpl.internalRollback(TransactionImpl.java:1594)
129 at com.ibm.tx.jta.impl.TransactionImpl.coreStage2CommitProcessing(TransactionImpl.java:865)
130 at com.ibm.tx.jta.impl.TransactionImpl.stage2CommitProcessing(TransactionImpl.java:891)
131 at com.ibm.tx.jta.impl.TransactionImpl.processCommit(TransactionImpl.java:771)
132 ... 22 more
133 Caused by: java.sql.SQLRecoverableException: Closed Connection
134 at oracle.jdbc.driver.PhysicalConnection.needLine(PhysicalConnection.java:3247)
135 at oracle.jdbc.driver.T4CXAResource.doEnd(T4CXAResource.java:384)
136 at oracle.jdbc.xa.client.OracleXAResource.end(OracleXAResource.java:461)
137 ... 32 more
used <transaction totalTranLifetimeTimeout="1200s" propogatedOrBMTTranLifetimeTimeout="1300s"/> for transaction timeout
I created a group of docker containers to run a web app (Python/Django). One of them is smtp-server:
smtp:
image: namshi/smtp:latest
networks:
- nginx_ext_network
environment:
MAILNAME: 'mailer'
restart: always
ports:
- "25:25"
But when the web app needs to send an email, smtp server tries to do it, but fails.
I tried it multiple times, with different ports and with different emails. Nothing works.
LOGS for smtp-container:
+ sed -ri '
s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
s/^#?(dc_relay_nets)=.*/\1='\''172.19.0.2\/16'\''/;
s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
' /etc/exim4/update-exim4.conf.conf
+ update-exim4.conf -v
using non-split configuration scheme from /etc/exim4/exim4.conf.template
1 LOG: MAIN
1 exim 4.89 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
273 LOG: MAIN
273 <= webmaster#localhost H=mailer_apache_1.mailer_nginx_ext_network (83d1331a44cb) [172.19.0.3] P=esmtp S=2162 id=156606357503.34.13723816267095054951#83d1331a44cb
273 LOG: smtp_connection MAIN
273 SMTP connection from mailer_apache_1.mailer_nginx_ext_network (83d1331a44cb) [172.19.0.3] closed by QUIT
274 Exim version 4.89 uid=101 gid=101 pid=274 D=40001
Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DKIM DNSSEC Event OCSP PRDR SOCKS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
274 delivering 1hz2fv-00004P-1K
274 R: dnslookup for djangomailape#gmail.com
275 T: remote_smtp for djangomailape#gmail.com
275 Connecting to gmail-smtp-in.l.google.com [2a00:1450:4010:c08::1a]:25 ... failed: Cannot assign requested address
275 LOG: MAIN
275 H=gmail-smtp-in.l.google.com [2a00:1450:4010:c08::1a] Cannot assign requested address
275 Connecting to gmail-smtp-in.l.google.com [64.233.165.27]:25 ... connected
275 SMTP(close)>>
275 LOG: MAIN
275 H=gmail-smtp-in.l.google.com [64.233.165.27]: Remote host closed connection in response to initial connection
275 Connecting to alt1.gmail-smtp-in.l.google.com [2404:6800:4008:c04::1a]:25 ... failed: Cannot assign requested address
275 LOG: MAIN
275 H=alt1.gmail-smtp-in.l.google.com [2404:6800:4008:c04::1a] Cannot assign requested address
275 Connecting to alt1.gmail-smtp-in.l.google.com [74.125.204.27]:25 ... connected
275 SMTP(close)>>
275 LOG: MAIN
275 H=alt1.gmail-smtp-in.l.google.com [74.125.204.27]: Remote host closed connection in response to initial connection
275 Connecting to alt2.gmail-smtp-in.l.google.com [2607:f8b0:400e:c04::1b]:25 ... failed: Cannot assign requested address
275 LOG: MAIN
275 H=alt2.gmail-smtp-in.l.google.com [2607:f8b0:400e:c04::1b] Cannot assign requested address
275 Connecting to alt3.gmail-smtp-in.l.google.com [2607:f8b0:4003:c09::1b]:25 ... failed: Cannot assign requested address
275 LOG: MAIN
275 H=alt3.gmail-smtp-in.l.google.com [2607:f8b0:4003:c09::1b] Cannot assign requested address
275 Connecting to alt4.gmail-smtp-in.l.google.com [2607:f8b0:4001:c16::1b]:25 ... failed: Cannot assign requested address
275 LOG: MAIN
275 H=alt4.gmail-smtp-in.l.google.com [2607:f8b0:4001:c16::1b] Cannot assign requested address
274 LOG: MAIN
274 == djangomailape#gmail.com R=dnslookup T=remote_smtp defer (99): Cannot assign requested address H=alt1.gmail-smtp-in.l.google.com [74.125.204.27]
276 LOG: MAIN
276 <= webmaster#localhost H=mailer_apache_1.mailer_nginx_ext_network (83d1331a44cb) [172.19.0.3] P=esmtp S=2187 id=156606361852.33.3228996691969512605#83d1331a44cb
276 LOG: smtp_connection MAIN
276 SMTP connection from mailer_apache_1.mailer_nginx_ext_network (83d1331a44cb) [172.19.0.3] closed by QUIT
277 Exim version 4.89 uid=101 gid=101 pid=277 D=40001
Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DKIM DNSSEC Event OCSP PRDR SOCKS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
277 delivering 1hz2gc-00004S-H8
277 R: dnslookup for eleriya-25#yandex.ru
278 T: remote_smtp for eleriya-25#yandex.ru
278 Connecting to mx.yandex.ru [2a02:6b8::89]:25 ... failed: Cannot assign requested address
278 LOG: MAIN
278 H=mx.yandex.ru [2a02:6b8::89] Cannot assign requested address
278 Connecting to mx.yandex.ru [87.250.250.89]:25 ... connected
278 SMTP(close)>>
278 LOG: MAIN
278 H=mx.yandex.ru [87.250.250.89]: Remote host closed connection in response to initial connection
278 Connecting to mx.yandex.ru [213.180.193.89]:25 ... connected
278 SMTP(close)>>
278 LOG: MAIN
278 H=mx.yandex.ru [213.180.193.89]: Remote host closed connection in response to initial connection
278 Connecting to mx.yandex.ru [213.180.204.89]:25 ... connected
278 SMTP(close)>>
278 LOG: MAIN
278 H=mx.yandex.ru [213.180.204.89]: Remote host closed connection in response to initial connection
278 Connecting to mx.yandex.ru [77.88.21.89]:25 ... connected
278 SMTP(close)>>
278 LOG: MAIN
278 H=mx.yandex.ru [77.88.21.89]: Remote host closed connection in response to initial connection
277 LOG: MAIN
277 == eleriya-25#yandex.ru R=dnslookup T=remote_smtp defer (-18) H=mx.yandex.ru [77.88.21.89]: Remote host closed connection in response to initial connection
Any suggestions?
I'm working on a project but my problem is that my librosa library shows me that the file was not found, but it is present.
# Load using Librosa
y, sr = librosa.load(normal_file, duration=5) #default sampling rate is 22 HZ
dur=librosa.get_duration(y)
print ("duration:", dur)
print(y.shape, sr)
The error:
FileNotFoundError
Traceback (most recent call last)
<ipython-input-31-d400d9a9c828> in <module>()
1 # Load using Librosa
----> 2 y, sr = librosa.load(normal_file) #default sampling rate is 22 HZ
3 dur=librosa.get_duration(y)
4 print ("duration:", dur)
5 print(y.shape, sr)
~\Anaconda3\lib\site-packages\librosa\core\audio.py in load(path, sr, mono, offset, duration, dtype, res_type)
117
118 y = []
--> 119 with audioread.audio_open(os.path.realpath(path)) as input_file:
120 sr_native = input_file.samplerate
121 n_channels = input_file.channels
~\Anaconda3\lib\site-packages\audioread\__init__.py in audio_open(path, backends)
105 """
106 if backends is None:
--> 107 backends = available_backends()
108
109 for BackendClass in backends:
~\Anaconda3\lib\site-packages\audioread\__init__.py in available_backends()
84
85 # FFmpeg.
---> 86 if ffdec.available():
87 result.append(ffdec.FFmpegAudioFile)
88
~\Anaconda3\lib\site-packages\audioread\ffdec.py in available()
106 stdout=subprocess.PIPE,
107 stderr=subprocess.PIPE,
--> 108 creationflags=PROC_FLAGS,
109 )
110 proc.wait()
~\Anaconda3\lib\site-packages\audioread\ffdec.py in popen_multiple(commands, command_args, *args, **kwargs)
92 cmd = [command] + command_args
93 try:
---> 94 return subprocess.Popen(cmd, *args, **kwargs)
95 except OSError:
96 if i == len(commands) - 1:
~\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
707 c2pread, c2pwrite,
708 errread, errwrite,
--> 709 restore_signals, start_new_session)
710 except:
711 # Cleanup if the child failed starting.
~\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
995 env,
996 os.fspath(cwd) if cwd is not None else None,
--> 997 startupinfo)
998 finally:
999 # Child is launched. Close the parent's copy of those pipe
FileNotFoundError: [WinError 2] The system cannot find the file specified
It shows duration and reads the audio file.
I have the log below trying to parse it by the indicated column number 1 as Date, 2 as Time, 3 as Task, 4 as Error_Line, and 5 all the rest columns as Error_Message
|1 | |2 | |3 | |4 | |5 |
09-15-16 05:23:45 B:VVBN 09064 Port 22 Device 10400 Remote 44 13331 Link Up RP2016
09-15-16 05:23:44 A:QAWE 09064 Port 22 Device 10400 Remote 44 13331 Link Up RP2016
09-15-16 05:23:44 B:VVBN 13425 Port 22 Device 10400 Remote 44 13331 Receive Time Error: 24666 23270 1396 69
09-15-16 05:23:43 B:QAWE 13372 Port 22 Device 10400 Remote 44 13331 Send Time Error: 444 1888 1444 69
09-15-16 05:23:43 A:VVBN 13425 Port 22 Device 10400 Remote 44 13331 Receive Time Error: 24666 23270 1396 69
09-15-16 05:23:43 A:CCBE 13372 Port 22 Device 10400 Remote 44 13331 Send Time Error: 444 1888 1444 69
09-15-16 05:21:56 B:VVBN 07270 Port 22 Device 10400 Remote 44 13331 AT Timer Expired
09-15-16 05:21:56 A:CCBE 07270 Port 22 Device 10400 Remote 44 13331 AT Timer Expired
here is my script
logs = LOAD '/data/test_log.txt' USING PigStorge(' ') AS (date: chararray, time: chararray, task: chararray, line_error: int, error_message: chararray);
date = GROUP logs BY date;
counts = FOREACH date GENERATE COUNT($4) as count;
DUMP counts;
notice there is one space between columns only there is five spaces between 3 and 4 columns.
I tried the script above but it just work good for date not for last column Error_message.
I am trying to get this output bag:
(09-15-16,05:23:45,B:VVBN,09064,Port 22 Device 10400 Remote 44 13331 Link Up RP2016)
(09-15-16,05:23:44,A:QAWE,09064,Port 22 Device 10400 Remote 44 13331 Link Up RP2016)
:
:
I just need to consider the first four columns any other columns in the log file mix them in one column 5.
Any suggestion to get the desired output.
You need to use MyRegExLoader provided by piggybank to process custom log files.
logs = LOAD '/data/test_log.txt' USING org.apache.pig.piggybank.storage.MyRegExLoader ('provide the regex ');